From 085dc1cfb29f358b50f83af7d39bfdbe663752c2 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 30 Jan 2026 12:54:16 +0200 Subject: [PATCH 1/3] Delete pre-release directory --- 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/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/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 ----------- pre-release/c101304005.lua | 92 ------------------- pre-release/c101304006.lua | 88 ------------------ pre-release/c101304007.lua | 78 ---------------- pre-release/c101304008.lua | 97 ------------------- pre-release/c101304009.lua | 99 -------------------- pre-release/c101304010.lua | 164 --------------------------------- pre-release/c101304011.lua | 110 ---------------------- pre-release/c101304012.lua | 143 ---------------------------- pre-release/c101304013.lua | 134 --------------------------- pre-release/c101304014.lua | 97 ------------------- pre-release/c101304015.lua | 86 ----------------- pre-release/c101304016.lua | 107 --------------------- pre-release/c101304017.lua | 91 ------------------ pre-release/c101304018.lua | 65 ------------- pre-release/c101304019.lua | 160 -------------------------------- pre-release/c101304020.lua | 184 ------------------------------------- pre-release/c101304021.lua | 102 -------------------- pre-release/c101304022.lua | 107 --------------------- pre-release/c101304023.lua | 90 ------------------ pre-release/c101304024.lua | 106 --------------------- pre-release/c101304025.lua | 89 ------------------ pre-release/c101304026.lua | 79 ---------------- pre-release/c101304027.lua | 100 -------------------- pre-release/c101304028.lua | 89 ------------------ pre-release/c101304029.lua | 84 ----------------- pre-release/c101304030.lua | 79 ---------------- pre-release/c101304031.lua | 118 ------------------------ pre-release/c101304032.lua | 71 -------------- pre-release/c101304033.lua | 95 ------------------- pre-release/c101304034.lua | 92 ------------------- pre-release/c101304035.lua | 54 ----------- pre-release/c101304038.lua | 96 ------------------- pre-release/c101304039.lua | 67 -------------- pre-release/c101304040.lua | 79 ---------------- pre-release/c101304041.lua | 110 ---------------------- pre-release/c101304042.lua | 86 ----------------- pre-release/c101304043.lua | 88 ------------------ pre-release/c101304044.lua | 72 --------------- pre-release/c101304045.lua | 83 ----------------- pre-release/c101304046.lua | 67 -------------- pre-release/c101304047.lua | 83 ----------------- pre-release/c101304048.lua | 71 -------------- pre-release/c101304049.lua | 89 ------------------ pre-release/c101304050.lua | 69 -------------- pre-release/c101304051.lua | 88 ------------------ pre-release/c101304053.lua | 88 ------------------ pre-release/c101304054.lua | 79 ---------------- pre-release/c101304055.lua | 86 ----------------- pre-release/c101304056.lua | 82 ----------------- pre-release/c101304057.lua | 81 ---------------- pre-release/c101304058.lua | 79 ---------------- pre-release/c101304059.lua | 55 ----------- pre-release/c101304060.lua | 106 --------------------- pre-release/c101304061.lua | 121 ------------------------ pre-release/c101304062.lua | 93 ------------------- pre-release/c101304063.lua | 80 ---------------- pre-release/c101304064.lua | 66 ------------- pre-release/c101304065.lua | 91 ------------------ pre-release/c101304066.lua | 71 -------------- pre-release/c101304067.lua | 71 -------------- pre-release/c101304068.lua | 99 -------------------- pre-release/c101304069.lua | 71 -------------- pre-release/c101304070.lua | 72 --------------- pre-release/c101304072.lua | 58 ------------ pre-release/c101304073.lua | 153 ------------------------------ pre-release/c101304074.lua | 111 ---------------------- pre-release/c101304075.lua | 70 -------------- pre-release/c101304076.lua | 78 ---------------- pre-release/c101304077.lua | 68 -------------- pre-release/c101304078.lua | 52 ----------- pre-release/c101304079.lua | 98 -------------------- pre-release/c101304080.lua | 75 --------------- pre-release/c101304101.lua | 103 --------------------- pre-release/c101304102.lua | 97 ------------------- pre-release/c101304103.lua | 93 ------------------- pre-release/c101304104.lua | 86 ----------------- pre-release/c101304105.lua | 83 ----------------- pre-release/c101304106.lua | 70 -------------- pre-release/c101304107.lua | 52 ----------- pre-release/c101304108.lua | 95 ------------------- 124 files changed, 11152 deletions(-) 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/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/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 delete mode 100644 pre-release/c101304005.lua delete mode 100644 pre-release/c101304006.lua delete mode 100644 pre-release/c101304007.lua delete mode 100644 pre-release/c101304008.lua delete mode 100644 pre-release/c101304009.lua delete mode 100644 pre-release/c101304010.lua delete mode 100644 pre-release/c101304011.lua delete mode 100644 pre-release/c101304012.lua delete mode 100644 pre-release/c101304013.lua delete mode 100644 pre-release/c101304014.lua delete mode 100644 pre-release/c101304015.lua delete mode 100644 pre-release/c101304016.lua delete mode 100644 pre-release/c101304017.lua delete mode 100644 pre-release/c101304018.lua delete mode 100644 pre-release/c101304019.lua delete mode 100644 pre-release/c101304020.lua delete mode 100644 pre-release/c101304021.lua delete mode 100644 pre-release/c101304022.lua delete mode 100644 pre-release/c101304023.lua delete mode 100644 pre-release/c101304024.lua delete mode 100644 pre-release/c101304025.lua delete mode 100644 pre-release/c101304026.lua delete mode 100644 pre-release/c101304027.lua delete mode 100644 pre-release/c101304028.lua delete mode 100644 pre-release/c101304029.lua delete mode 100644 pre-release/c101304030.lua delete mode 100644 pre-release/c101304031.lua delete mode 100644 pre-release/c101304032.lua delete mode 100644 pre-release/c101304033.lua delete mode 100644 pre-release/c101304034.lua delete mode 100644 pre-release/c101304035.lua delete mode 100644 pre-release/c101304038.lua delete mode 100644 pre-release/c101304039.lua delete mode 100644 pre-release/c101304040.lua delete mode 100644 pre-release/c101304041.lua delete mode 100644 pre-release/c101304042.lua delete mode 100644 pre-release/c101304043.lua delete mode 100644 pre-release/c101304044.lua delete mode 100644 pre-release/c101304045.lua delete mode 100644 pre-release/c101304046.lua delete mode 100644 pre-release/c101304047.lua delete mode 100644 pre-release/c101304048.lua delete mode 100644 pre-release/c101304049.lua delete mode 100644 pre-release/c101304050.lua delete mode 100644 pre-release/c101304051.lua delete mode 100644 pre-release/c101304053.lua delete mode 100644 pre-release/c101304054.lua delete mode 100644 pre-release/c101304055.lua delete mode 100644 pre-release/c101304056.lua delete mode 100644 pre-release/c101304057.lua delete mode 100644 pre-release/c101304058.lua delete mode 100644 pre-release/c101304059.lua delete mode 100644 pre-release/c101304060.lua delete mode 100644 pre-release/c101304061.lua delete mode 100644 pre-release/c101304062.lua delete mode 100644 pre-release/c101304063.lua delete mode 100644 pre-release/c101304064.lua delete mode 100644 pre-release/c101304065.lua delete mode 100644 pre-release/c101304066.lua delete mode 100644 pre-release/c101304067.lua delete mode 100644 pre-release/c101304068.lua delete mode 100644 pre-release/c101304069.lua delete mode 100644 pre-release/c101304070.lua delete mode 100644 pre-release/c101304072.lua delete mode 100644 pre-release/c101304073.lua delete mode 100644 pre-release/c101304074.lua delete mode 100644 pre-release/c101304075.lua delete mode 100644 pre-release/c101304076.lua delete mode 100644 pre-release/c101304077.lua delete mode 100644 pre-release/c101304078.lua delete mode 100644 pre-release/c101304079.lua delete mode 100644 pre-release/c101304080.lua delete mode 100644 pre-release/c101304101.lua delete mode 100644 pre-release/c101304102.lua delete mode 100644 pre-release/c101304103.lua delete mode 100644 pre-release/c101304104.lua delete mode 100644 pre-release/c101304105.lua delete mode 100644 pre-release/c101304106.lua delete mode 100644 pre-release/c101304107.lua delete mode 100644 pre-release/c101304108.lua 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/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/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 diff --git a/pre-release/c101304005.lua b/pre-release/c101304005.lua deleted file mode 100644 index ba8c58e3b7..0000000000 --- a/pre-release/c101304005.lua +++ /dev/null @@ -1,92 +0,0 @@ ---バスターソニック・ウォリアー ---Assault Sonic Warrior ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If you control "Junk Warrior", "Assault Mode Activate", or a card that mentions either of them: You can Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If this card is Normal or Special Summoned: You can add 1 "Synchron" monster or "Assault Mode Activate" from your Deck to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --If this card is sent to the GY as Synchro Material: You can activate this effect; this turn, monsters you control gain 500 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_BE_MATERIAL) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end) - e3:SetOperation(s.atkop) - c:RegisterEffect(e3) -end -s.listed_series={SET_SYNCHRON} -s.listed_names={CARD_JUNK_WARRIOR,CARD_ASSAULT_MODE} -function s.spconfilter(c) - return (c:IsCode(CARD_JUNK_WARRIOR,CARD_ASSAULT_MODE) or c:ListsCode(CARD_JUNK_WARRIOR,CARD_ASSAULT_MODE)) and c:IsFaceup() -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_ONFIELD,0,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,LOCATION_HAND) -end -function s.thfilter(c) - return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return ((c:IsSetCard(SET_SYNCHRON) and c:IsMonster()) or c:IsCode(CARD_ASSAULT_MODE)) 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.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) - --This turn, monsters you control gain 500 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetValue(500) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101304006.lua b/pre-release/c101304006.lua deleted file mode 100644 index 78f1d5b09f..0000000000 --- a/pre-release/c101304006.lua +++ /dev/null @@ -1,88 +0,0 @@ ---重装騎士バベルデッカー ---Heavy Knight Babel Decker ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can Normal Summon this card without Tributing - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(s.ntcon) - c:RegisterEffect(e1) - --Special Summon 1 EARTH Machine monster from your hand - 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_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,0}) - e2a:SetTarget(s.handsptg) - e2a:SetOperation(s.handspop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --Special Summon 1 Rank 10 EARTH Machine Xyz Monster from your Extra Deck using this card you control as material (this is treated as an Xyz Summon) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp) return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 end) - e3:SetTarget(s.extrasptg) - e3:SetOperation(s.extraspop) - c:RegisterEffect(e3) - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,aux.FALSE) -end -function s.ntcon(e,c,minc) - if c==nil then return true end - return minc==0 and c:IsLevelAbove(4) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function s.handspfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.handsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.handspop(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.handspfilter,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.extraspfilter(c,e,tp,mc) - return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(10) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) - and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function s.extrasptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) - and Duel.IsExistingMatchingCard(s.extraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.extraspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - if #pg>1 or (#pg==1 and not pg:IsContains(c)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xc=Duel.SelectMatchingCard(tp,s.extraspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c):GetFirst() - if not xc then return end - xc:SetMaterial(c) - Duel.Overlay(xc,c) - if Duel.SpecialSummon(xc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then - xc:CompleteProcedure() - end -end \ No newline at end of file diff --git a/pre-release/c101304007.lua b/pre-release/c101304007.lua deleted file mode 100644 index 7552558ffa..0000000000 --- a/pre-release/c101304007.lua +++ /dev/null @@ -1,78 +0,0 @@ ---夜光列車ブルートラベラー ---Noctilucent Train Bleu Traveler ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Train Connection" or "Revolving Switchyard" from your Deck or GY to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_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) - --Special Summon both 1 other EARTH Machine monster in your GY and this card, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Machine monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={60879050,76136345} --"Train Connection", "Revolving Switchyard" -function s.thfilter(c) - return c:IsCode(60879050,76136345) 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|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then - Duel.SpecialSummon(Group.FromCards(c,tc),0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Machine 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: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/c101304008.lua b/pre-release/c101304008.lua deleted file mode 100644 index c1dea0bda5..0000000000 --- a/pre-release/c101304008.lua +++ /dev/null @@ -1,97 +0,0 @@ ---捕食植物テッポウリザード ---Predaplant Lilizard ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --1 face-up monster becomes DARK until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.attg) - e2:SetOperation(s.atop) - c:RegisterEffect(e2) - --Draw 1 card if this card is Special Summoned from the GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_GRAVE) end) - e3:SetTarget(s.drtg) - e3:SetOperation(s.drop) - c:RegisterEffect(e3) -end -s.listed_series={SET_PREDAPLANT,SET_STARVING_VENOM} -s.listed_names={CARD_POLYMERIZATION} -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,{SET_PREDAPLANT,SET_STARVING_VENOM}),tp,LOCATION_MZONE,0,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,LOCATION_HAND) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thfilter(c) - return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() -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 g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - if #sg==0 then return end - Duel.BreakEffect() - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end - end -end -function s.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttributeExcept(ATTRIBUTE_DARK) end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAttributeExcept,ATTRIBUTE_DARK),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAttributeExcept,ATTRIBUTE_DARK),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function s.atop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - --It becomes DARK until the end of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetValue(ATTRIBUTE_DARK) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function s.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end diff --git a/pre-release/c101304009.lua b/pre-release/c101304009.lua deleted file mode 100644 index 31ef8470dc..0000000000 --- a/pre-release/c101304009.lua +++ /dev/null @@ -1,99 +0,0 @@ ---捕食植物ロンギネフィラ ---Predaplant Longinephila ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Predap" card from your Deck to your hand - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetTarget(s.thtg) - e1a:SetOperation(s.thop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --Activate 1 of the following effects (Place Predator Counter, Set "Polymerization" from GY or banishment) - 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:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_PREDAP} -s.listed_names={CARD_POLYMERIZATION,id} -s.counter_place_list={COUNTER_PREDATOR} -function s.predapthfilter(c) - return c:IsSetCard(SET_PREDAP) and c:IsAbleToHand() and not c:IsCode(id) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.predapthfilter,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.predapthfilter,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.predctfilter(c) - return c:IsFaceup() and c:IsCanAddCounter(COUNTER_PREDATOR,1) -end -function s.polysetfilter(c) - return c:IsCode(CARD_POLYMERIZATION) and c:IsFaceup() and c:IsSSetable() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.predctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - local b2=Duel.IsExistingMatchingCard(s.polysetfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_COUNTER) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,tp,COUNTER_PREDATOR) - elseif op==2 then - e:SetCategory(CATEGORY_SET) - Duel.SetPossibleOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Place 1 Predator Counter on 1 monster on the field and make it Level 1 so long as it has a Predator Counter if it is Level 2 or higher - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) - local tc=Duel.SelectMatchingCard(tp,s.predctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() - if not tc then return end - Duel.HintSelection(tc) - if tc:AddCounter(COUNTER_PREDATOR,1) and tc:IsLevelAbove(2) then - --It becomes Level 1 as long as it has a Predator Counter - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetCondition(function(e) return e:GetHandler():HasCounter(COUNTER_PREDATOR) end) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - elseif op==2 then - --Set 1 "Polymerization" from your GY or banishment - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.polysetfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) - if #sg>0 then - Duel.HintSelection(sg) - Duel.SSet(tp,sg) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304010.lua b/pre-release/c101304010.lua deleted file mode 100644 index 2167eff3fa..0000000000 --- a/pre-release/c101304010.lua +++ /dev/null @@ -1,164 +0,0 @@ ---混絶獄神ヴィードリウム ---Vidrium the Power Patron of Chaos Extermination ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - Pendulum.AddProcedure(c) - --Must be Special Summoned (from your face-up Extra Deck or GY) by returning 1 Fusion, 1 Synchro, and 1 Xyz Monster from your face-up field and/or GY to the Extra Deck - c:AddMustBeSpecialSummoned() - 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|LOCATION_GRAVE) - e0:SetCondition(s.selfspcon) - e0:SetTarget(s.selfsptg) - e0:SetOperation(s.selfspop) - c:RegisterEffect(e0) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --If this card is added to your Extra Deck face-up: You can add 1 "Power Patron" card from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_DECK) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.thcon) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --If this card is Special Summoned: Banish (face-down) all cards from the GYs - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,3)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetTarget(s.rmtg) - e3:SetOperation(s.rmop) - c:RegisterEffect(e3) - --Unaffected by monster effects, except "Power Patron" monsters - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetCode(EFFECT_IMMUNE_EFFECT) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(function(e,te) return te:IsMonsterEffect() and not te:GetOwner():IsSetCard(SET_POWER_PATRON) end) - c:RegisterEffect(e4) -end -s.listed_series={SET_POWER_PATRON} -local TYPES_FSX=TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ -function s.tdfilter(c) - return c:IsType(TYPES_FSX) and c:IsAbleToExtraAsCost() -end -function s.tdrescon(sg,e,tp,mg) - return sg:GetBitwiseOr(Card.GetType)&TYPES_FSX==TYPES_FSX - and (e:GetHandler():IsLocation(LOCATION_GRAVE) and Duel.GetMZoneCount(tp,sg)>0 or Duel.GetLocationCountFromEx(tp,tp,sg,e:GetHandler())>0) -end -function s.selfspcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) - return aux.SelectUnselectGroup(g,e,tp,3,3,s.tdrescon,0) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) - local rg=aux.SelectUnselectGroup(g,e,tp,3,3,s.tdrescon,1,tp,HINTMSG_TODECK,nil,nil,true) - if #rg~=3 then return false end - e:SetLabelObject(rg) - return true -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - Duel.HintSelection(g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_POWER_PATRON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local b1=Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,4)}, - {true,aux.Stringid(id,5)}) - e:SetLabel(op) - local c=e:GetHandler() - if op==1 then - e:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) - elseif op==2 then - e:SetCategory(CATEGORY_DESTROY) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local op=e:GetLabel() - if op==1 then - --Destroy this card, and if you do, Special Summon 1 "Power Patron" monster from your hand or GY - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and Duel.GetMZoneCount(tp)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - elseif op==2 then - --Destroy this card, also this turn, "Power Patron" monsters you control whose original Level is 12 gain 5000 ATK - if c:IsRelateToEffect(e) then - Duel.Destroy(c,REASON_EFFECT) - end - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,6)) - --"Power Patron" monsters you control whose original Level is 12 gain 5000 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_POWER_PATRON) and c:IsOriginalLevel(12) end) - e1:SetValue(5000) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function s.thcon(e) - local c=e:GetHandler() - return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() -end -function s.thfilter(c) - return c:IsSetCard(SET_POWER_PATRON) 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.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,nil,POS_FACEDOWN) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,nil,POS_FACEDOWN) - if #g>0 then - Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304011.lua b/pre-release/c101304011.lua deleted file mode 100644 index ac59b413fe..0000000000 --- a/pre-release/c101304011.lua +++ /dev/null @@ -1,110 +0,0 @@ ---獄神影獣-ネルヴェド ---Power Patron Shadow Beast Nervedo ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --When a monster effect activated by your opponent in response to the activation of your "Power Patron" or "Artmage" monster's effect resolves, 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 banish (face-down) the top 3 cards of your Deck; destroy this card, and if you do, Special Summon 1 "Nerva the Power Patron of Creation" from your Extra Deck (this is treated as a Fusion Summon) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(s.descost) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) - --If this card is added to your Extra Deck face-up: You can Special Summon 1 "Power Patron" or "Artmage" monster from your Deck or face-up Extra Deck, except "Power Patron Shadow Beast Nervedo" - 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_DECK) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.spcon) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_names={id,53589300} --"Nerva the Power Patron of Creation" -s.listed_series={SET_POWER_PATRON,SET_ARTMAGE} -function s.discon(e,tp,eg,ep,ev,re,r,rp) - local ch=Duel.GetCurrentChain()-1 - if not (ch>0 and ep==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) and not Duel.HasFlagEffect(tp,id)) then return false end - local ctrl,setcodes,trig_eff=Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_SETCODES,CHAININFO_TRIGGERING_EFFECT) - if ctrl~=tp or not trig_eff:IsMonsterEffect() then return false end - for _,set in ipairs(setcodes) do - if (SET_POWER_PATRON&0xfff)==(set&0xfff) and (SET_POWER_PATRON&set)==SET_POWER_PATRON then return true end - if (SET_ARTMAGE&0xfff)==(set&0xfff) and (SET_ARTMAGE&set)==SET_ARTMAGE then return true end - end -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,2)) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - Duel.Hint(HINT_CARD,0,id) - if Duel.NegateEffect(ev) then - Duel.BreakEffect() - Duel.Destroy(c,REASON_EFFECT) - end -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetDecktopGroup(tp,3) - if chk==0 then return g:IsExists(Card.IsAbleToRemoveAsCost,3,nil,POS_FACEDOWN) end - Duel.DisableShuffleCheck() - Duel.Remove(g,POS_FACEDOWN,REASON_COST) -end -function s.nervaspfilter(c,e,tp,hc) - return c:IsCode(53589300) and Duel.GetLocationCountFromEx(tp,tp,hc,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.nervaspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.nervaspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if not sc then return end - sc:SetMaterial(nil) - if Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - end -end -function s.spcon(e) - local c=e:GetHandler() - return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() -end -function s.spfilter(c,e,tp) - if not c:IsSetCard({SET_POWER_PATRON,SET_ARTMAGE}) or c:IsCode(id) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end - if c:IsLocation(LOCATION_DECK) then - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - else - return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101304012.lua b/pre-release/c101304012.lua deleted file mode 100644 index 9f5bc6dd76..0000000000 --- a/pre-release/c101304012.lua +++ /dev/null @@ -1,143 +0,0 @@ ---獄神影機-ゼグレド ---Power Patron Shadow Machine Zegredo ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --During your Main Phase: You can destroy both this card and 1 "Power Patron" or "DoomZ" monster in your hand or face-up field, then you can destroy 1 card on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.pdestg) - e1:SetOperation(s.pdesop) - c:RegisterEffect(e1) - --You can banish (face-down) the top 3 cards of your Deck; destroy this card, and if you do, Special Summon 1 "Jupiter the Power Patron of Destruction" from your Extra Deck (this is treated as an Xyz Summon), then you can attach 1 card from your hand to it - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.mdescost) - e2:SetTarget(s.mdestg) - e2:SetOperation(s.mdesop) - c:RegisterEffect(e2) - --If this card is added to your Extra Deck face-up: You can add 1 "Power Patron" or "DoomZ" Spell/Trap from your Deck to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_DECK) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.thcon) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_names={68231287} --"Jupiter the Power Patron of Destruction" -s.listed_series={SET_POWER_PATRON,SET_DOOMZ} -function s.pdesfilter(c) - return c:IsSetCard({SET_POWER_PATRON,SET_DOOMZ}) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsMonster() -end -function s.pdestg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.pdesfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),2,tp,LOCATION_PZONE|LOCATION_MZONE|LOCATION_HAND) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -end -function s.pdesop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectMatchingCard(tp,s.pdesfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,nil) - if #g1==0 then return end - if g1:GetFirst():IsOnField() then Duel.HintSelection(g1) end - if Duel.Destroy(g1+c,REASON_EFFECT)~=2 then return end - local dg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if #dg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=dg:Select(tp,1,1,nil) - if #g2>0 then - Duel.HintSelection(g2) - Duel.BreakEffect() - Duel.Destroy(g2,REASON_EFFECT) - end -end -function s.mdescost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetDecktopGroup(tp,3) - if chk==0 then return g:IsExists(Card.IsAbleToRemoveAsCost,3,nil,POS_FACEDOWN) end - Duel.DisableShuffleCheck() - Duel.Remove(g,POS_FACEDOWN,REASON_COST) -end -function s.jupiterspfilter(c,e,tp,hc) - return c:IsCode(68231287) and Duel.GetLocationCountFromEx(tp,tp,hc,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function s.mdestg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.jupiterspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.mdesop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xc=Duel.SelectMatchingCard(tp,s.jupiterspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if not xc then return end - xc:SetMaterial(nil) - if Duel.SpecialSummon(xc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end - xc:CompleteProcedure() - local g=Duel.GetMatchingGroup(Card.IsCanBeXyzMaterial,tp,LOCATION_HAND,0,nil,xc,tp,REASON_EFFECT) - if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,4)) then return end - local attg=g:Select(tp,1,1,nil) - if #attg>0 then - Duel.BreakEffect() - Duel.Overlay(xc,attg) - end -end -function s.spfilter(c,e,tp) - if not c:IsSetCard({SET_POWER_PATRON,SET_ARTMAGE}) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end - if c:IsLocation(LOCATION_DECK) then - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - else - return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)==0 - end -end -function s.spcon(e) - local c=e:GetHandler() - return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thcon(e) - local c=e:GetHandler() - return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() -end -function s.thfilter(c) - return c:IsSetCard({SET_POWER_PATRON,SET_DOOMZ}) 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 diff --git a/pre-release/c101304013.lua b/pre-release/c101304013.lua deleted file mode 100644 index 9265026f49..0000000000 --- a/pre-release/c101304013.lua +++ /dev/null @@ -1,134 +0,0 @@ ---獄神影精-ジュノルド ---Power Patron Shadow Spirit Junordo ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --If a "Power Patron" and/or "Elvennotes" monster(s) is Special Summoned to your field while this card is in the Pendulum Zone: You can destroy this card, and if you do, draw 2 cards, then discard 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.pdescon) - e1:SetTarget(s.pdestg) - e1:SetOperation(s.pdesop) - c:RegisterEffect(e1) - --You can banish (face-down) the top 3 cards of your Deck; destroy this card, and if you do, Special Summon 1 "Junora the Power Patron of Tuning" from your Extra Deck (this is treated as a Synchro Summon) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.mdescost) - e2:SetTarget(s.mdestg) - e2:SetOperation(s.mdesop) - c:RegisterEffect(e2) - --If this card is added to your Extra Deck face-up: You can add 1 "Power Patron" or "Elvennotes" card from your face-up Extra Deck or GY to your hand, except "Power Patron Shadow Spirit Junordo" - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_DECK) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.thcon) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_names={id,5914858} --"Junora the Power Patron of Tuning" -s.listed_series={SET_POWER_PATRON,SET_ELVENNOTES} -function s.pdesconfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard({SET_POWER_PATRON,SET_ELVENNOTES}) -end -function s.pdescon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.pdesconfilter,1,nil,tp) -end -function s.pdestg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function s.pdesop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and Duel.Draw(tp,2,REASON_EFFECT)==2 then - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) - end -end -function s.junoraspfilter(c,e,tp,hc) - return c:IsCode(5914858) and Duel.GetLocationCountFromEx(tp,tp,hc,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) -end -function s.mdescost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetDecktopGroup(tp,3) - if chk==0 then return g:IsExists(Card.IsAbleToRemoveAsCost,3,nil,POS_FACEDOWN) end - Duel.DisableShuffleCheck() - Duel.Remove(g,POS_FACEDOWN,REASON_COST) -end -function s.mdestg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.junoraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.mdesop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.junoraspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if not sc then return end - sc:SetMaterial(nil) - if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - end -end -function s.spfilter(c,e,tp) - if not c:IsSetCard({SET_POWER_PATRON,SET_ARTMAGE}) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end - if c:IsLocation(LOCATION_DECK) then - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - else - return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)==0 - end -end -function s.spcon(e) - local c=e:GetHandler() - return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thcon(e) - local c=e:GetHandler() - return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() -end -function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard({SET_POWER_PATRON,SET_ELVENNOTES}) and c:IsAbleToHand() and not c:IsCode(id) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304014.lua b/pre-release/c101304014.lua deleted file mode 100644 index 4c3f45dcfb..0000000000 --- a/pre-release/c101304014.lua +++ /dev/null @@ -1,97 +0,0 @@ ---耀聖の風詩レギナ ---Elvennotes Regina ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --(Quick Effect): You can send 1 other "Elvennotes" card from your hand or face-up field to the GY; Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.selfspcost) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --If this card is Normal or Special Summoned to the center Main Monster Zone: You can Special Summon 1 "Elvennotes" monster from your Deck, except "Elvennotes Regina" - 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_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetCondition(function(e) return e:GetHandler():IsSequence(2) end) - e2a:SetTarget(s.sptg) - e2a:SetOperation(s.spop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --If this card is sent to the GY as Synchro Material: You can add this card to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_names={id} -s.listed_series={SET_ELVENNOTES} -function s.selfspcostfilter(c,tp) - return c:IsSetCard(SET_ELVENNOTES) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 - and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) -end -function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,c,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,c,tp) - 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 c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ELVENNOTES) 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_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.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304015.lua b/pre-release/c101304015.lua deleted file mode 100644 index 7da83f5030..0000000000 --- a/pre-release/c101304015.lua +++ /dev/null @@ -1,86 +0,0 @@ ---道化の一座 ホワイトフェイス ---Clown Crew Biancaviso ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --You can Tribute Summon this card face-up by Tributing 1 Ritual, Fusion, Synchro, Xyz, Pendulum, or Link Monster - local e0=aux.AddNormalSummonProcedure(c,true,true,1,1,SUMMON_TYPE_TRIBUTE,aux.Stringid(id,0),s.tributefilter) - --If this card is Tribute Summoned: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Biancaviso" once per turn) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(function(e) return c:IsTributeSummoned() end) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Once per turn, during your opponent's Main Phase, you can (Quick Effect): Immediately after this effect resolves, Tribute Summon 1 monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetCategory(CATEGORY_SUMMON+CATEGORY_SET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e,tp) return Duel.IsMainPhase(1-tp) end) - e2:SetTarget(s.tribsumtg) - e2:SetOperation(s.tribsumop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -function s.tributefilter(c,tp) - return c:IsType(TYPE_RITUAL|TYPE_PENDULUM|TYPE_EXTRA) and (c:IsControler(tp) or c:IsFaceup()) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetHandler():GetMaterialCount() - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsPlayerCanDraw(tp,ct) - local b2=not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,ct,nil) - if chk==0 then return ct>0 and (b1 or b2) end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) - e:SetLabel(op,ct) - if op==1 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_DRAW) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) - elseif op==2 then - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_DISABLE) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,ct,1-tp,LOCATION_ONFIELD) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op,ct=e:GetLabel() - if op==1 then - --● Draw cards equal to the number of monsters Tributed for its Tribute Summon - Duel.Draw(tp,ct,REASON_EFFECT) - elseif op==2 then - --● Negate the effects of face-up cards your opponent controls, equal to the number of monsters Tributed for its Tribute Summon - local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) - if #g>=ct then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - g=g:Select(tp,ct,ct,nil) - Duel.HintSelection(g) - local c=e:GetHandler() - for sc in g:Iter() do - --Negate their effects - sc:NegateEffects(c,nil,true) - end - end - end -end -function s.tribsumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.CanSummonOrSet,tp,LOCATION_HAND,0,1,nil,true,nil,1) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) -end -function s.tribsumop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,Card.CanSummonOrSet,tp,LOCATION_HAND,0,1,1,nil,true,nil,1):GetFirst() - if sc then - Duel.SummonOrSet(tp,sc,true,nil,1) - end -end \ No newline at end of file diff --git a/pre-release/c101304016.lua b/pre-release/c101304016.lua deleted file mode 100644 index 212144217c..0000000000 --- a/pre-release/c101304016.lua +++ /dev/null @@ -1,107 +0,0 @@ ---妖精伝姫-マチリル ---Fairy Tail - Matchlille ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand or GY, also you cannot Special Summon for the rest of this turn, except Spellcaster 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|LOCATION_GRAVE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Fairy Tail" Spell/Trap from your Deck to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --Make the name of 1 Effect Monster your opponent controls become "Fairy Prince" - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,2}) - e3:SetCost(Cost.PayLP(500)) - e3:SetTarget(s.namechangetg) - e3:SetOperation(s.namechangeop) - c:RegisterEffect(e3) -end -s.listed_series={SET_FAIRY_TAIL} -s.listed_names={91957038,CARD_FAIRY_PRINCE} --"Fairy Tail Tales" -function s.spconfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsBaseAttack(1850) and c:IsFaceup() -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,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 - --You cannot Special Summon for the rest of this turn, except Spellcaster monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsRace(RACE_SPELLCASTER) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thfilter(c) - return ((c:IsSetCard(SET_FAIRY_TAIL) and c:IsSpellTrap()) or c:IsCode(91957038)) 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.namechangefilter(c) - return c:IsType(TYPE_EFFECT) and c:IsFaceup() and not c:IsCode(CARD_FAIRY_PRINCE) -end -function s.namechangetg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.namechangefilter,tp,0,LOCATION_MZONE,1,nil) end -end -function s.namechangeop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - local sc=Duel.SelectMatchingCard(tp,s.namechangefilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - if sc then - Duel.HintSelection(sc) - --Its name becomes "Fairy Prince" - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(CARD_FAIRY_PRINCE) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101304017.lua b/pre-release/c101304017.lua deleted file mode 100644 index d82113c810..0000000000 --- a/pre-release/c101304017.lua +++ /dev/null @@ -1,91 +0,0 @@ ---ミミグル・フラワー ---Mimighoul Flower -local s,id=GetID() -function s.initial_effect(c) - --FLIP: Apply these effects in sequence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_F) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --During your Main Phase: You can Special Summon this card from your hand to your opponent's field in face-down Defense Position, or if a face-down monster is on the field, you can Special Summon this card face-up on your field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MIMIGHOUL} -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - if c:IsAbleToChangeControler() then - Duel.SetOperationInfo(0,CATEGORY_CONTROL,c,1,tp,0) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_DECK) -end -function s.thfilter(c) - return (c:IsType(TYPE_FLIP) or c:IsSetCard(SET_MIMIGHOUL)) and c:IsAbleToHand() -end -function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) - local break_chk=false - --Your opponent can add 1 Flip monster or "Mimighoul" card from their Deck to their hand - local opp=1-tp - if Duel.IsExistingMatchingCard(s.thfilter,opp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(opp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(opp,s.thfilter,opp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - break_chk=true - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(tp,g) - Duel.ShuffleHand(opp) - end - end - --Give control of this card to your opponent - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - if break_chk then Duel.BreakEffect() end - Duel.GetControl(c,opp) - end -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return (Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp)) - or (Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and 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 not c:IsRelateToEffect(e) then return end - local b1=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp) - local b2=Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - local op=nil - if b1 and b2 then - op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) - else - op=(b1 and 1) or (b2 and 2) or 1 - end - if op==1 then - if Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)==0 then return end - Duel.ConfirmCards(tp,c) - elseif op==2 then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101304018.lua b/pre-release/c101304018.lua deleted file mode 100644 index 9d88d0014c..0000000000 --- a/pre-release/c101304018.lua +++ /dev/null @@ -1,65 +0,0 @@ ---見えざる手マキブエル ---Hecahands Makibel -local s,id=GetID() -function s.initial_effect(c) - --If this card battles a monster, neither can be destroyed by that battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(s.indestg) - e1:SetValue(1) - c:RegisterEffect(e1) - --You can reveal this card in your hand; Fusion Summon 1 "Hecahands" Fusion Monster from your Extra Deck, using monsters from your hand or field, including this card in the hand - local fusion_params={ - handler=c, - fusfilter=function(c) return c:IsSetCard(SET_HECAHANDS) end, - gc=Fusion.ForcedHandler - } - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(Cost.SelfReveal) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2) - --If an Illusion Fusion Monster(s) is sent to your GY while this card is in your GY: You can add this card to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.thcon) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_series={SET_HECAHANDS} -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -end -function s.thconfilter(c,tp) - return c:IsRace(RACE_ILLUSION) and c:IsFusionMonster() and c:IsControler(tp) -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.thconfilter,1,nil,tp) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoHand(c,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304019.lua b/pre-release/c101304019.lua deleted file mode 100644 index 01fd3aeaa3..0000000000 --- a/pre-release/c101304019.lua +++ /dev/null @@ -1,160 +0,0 @@ ---糾罪巧γ’-「exapatisIA」 ---Trito Enneacraft - "exapatisIA" -local s,id=GetID() -function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_EC,LOCATION_PZONE) - Pendulum.AddProcedure(c) - --Each time a monster(s) is flipped face-up, place 1 E.C. Counter on this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_FLIP) - e1:SetRange(LOCATION_PZONE) - e1:SetOperation(s.counterop) - c:RegisterEffect(e1) - --Reveal 3 "Enneacraft" cards from your Deck, your opponent randomly picks 1 for you to add to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.PayLP(900)) - e2:SetTarget(s.rvtg) - e2:SetOperation(s.rvop) - c:RegisterEffect(e2) - --FLIP: Destroy 1 Spell/Trap your opponent controls, and if you do, Special Summon 1 monster from your hand in face-down Defense Position - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_SET) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_FLIP) - e3:SetTarget(s.fliptg) - e3:SetOperation(s.flipop) - c:RegisterEffect(e3) - --Add 1 "Enneacraft" card from your Deck to your hand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e4:SetCode(EVENT_CHAINING) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(function(e,tp,eg,ep,ev,re) return e:GetHandler():IsFacedown() and ep==1-tp and re:IsHasCategory(CATEGORY_SET) end) - e4:SetCost(Cost.SelfChangePosition(POS_FACEUP_DEFENSE)) - e4:SetTarget(s.thtg) - e4:SetOperation(s.thop) - c:RegisterEffect(e4) - --Special Summon 1 monster from your hand in face-down Defense Position - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,3)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SET) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_HAND) - e5:SetCost(Cost.AND(Cost.SelfReveal,s.spcost)) - e5:SetTarget(s.sptg) - e5:SetOperation(s.spop) - c:RegisterEffect(e5) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsPosition(POS_FACEDOWN_DEFENSE) end) -end -s.counter_place_list={COUNTER_EC} -s.listed_series={SET_ENNEACRAFT} -function s.counterop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not Duel.IsChainSolving() then - c:AddCounter(COUNTER_EC,1) - else - --Place 1 E.C. Counter on this card 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_PZONE) - e1:SetOperation(function() c:AddCounter(COUNTER_EC,1) 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.rvfilter(c) - return c:IsSetCard(SET_ENNEACRAFT) and c:IsAbleToHand() and not c:IsPublic() -end -function s.rvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rvfilter,tp,LOCATION_DECK,0,3,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.rvop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,s.rvfilter,tp,LOCATION_DECK,0,3,3,nil) - if #g~=3 then return end - Duel.ConfirmCards(1-tp,g) - local sg=g:RandomSelect(1-tp,1) - Duel.ShuffleDeck(tp) - if #sg>0 then - Duel.DisableShuffleCheck() - Duel.SendtoHand(sg,nil,REASON_EFFECT) - end -end -function s.fliptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.flipop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) - if #dg==0 then return end - Duel.HintSelection(dg) - if Duel.Destroy(dg,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,1,nil,e,0,tp,false,false,POS_FACEDOWN_DEFENSE) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) - end - end -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - --You cannot Special Summon the turn you activate this effect, except in face-down Defense Position - 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_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_FORCE_SPSUMMON_POSITION) - e1:SetTargetRange(1,0) - e1:SetValue(POS_FACEDOWN_DEFENSE) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,nil,e,0,tp,false,false,POS_FACEDOWN_DEFENSE) 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,Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,1,nil,e,0,tp,false,false,POS_FACEDOWN_DEFENSE) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_ENNEACRAFT) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101304020.lua b/pre-release/c101304020.lua deleted file mode 100644 index ffd02c646c..0000000000 --- a/pre-release/c101304020.lua +++ /dev/null @@ -1,184 +0,0 @@ ---糾罪巧-Atilε.SPIA ---Enneacraft - Atil.SPIA -local s,id=GetID() -function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_EC,LOCATION_PZONE) - Pendulum.AddProcedure(c) - --Each time a monster(s) is flipped face-up, place 1 E.C. Counter on this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_FLIP) - e1:SetRange(LOCATION_PZONE) - e1:SetOperation(s.counterop) - c:RegisterEffect(e1) - --Destroy 1 monster your opponent controls with less ATK than this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PHASE|PHASE_BATTLE) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1) - e2:SetCondition(s.descon) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) - --After this card was flipped face-up, while it is in the Monster Zone, your opponent cannot activate cards or effects in response to the activation of their own cards and effects - local e3a=Effect.CreateEffect(c) - e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e3a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3a:SetCode(EVENT_FLIP) - e3a:SetOperation(function(e) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) end) - c:RegisterEffect(e3a) - local e3b=Effect.CreateEffect(c) - e3b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3b:SetCode(EVENT_CHAINING) - e3b:SetRange(LOCATION_MZONE) - e3b:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) - e3b:SetOperation(s.chainlimop) - c:RegisterEffect(e3b) - --When your opponent activates a card or effect as Chain Link 3 or higher (Quick Effect): You can change this face-down card to face-up Defense Position; negate the activations of your opponent's cards and effects activated before this effect in this Chain, and if you do, destroy the negated cards - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e4:SetCode(EVENT_CHAINING) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(s.negcon) - e4:SetCost(Cost.SelfChangePosition(POS_FACEUP_DEFENSE)) - e4:SetTarget(s.negtg) - e4:SetOperation(s.negop) - c:RegisterEffect(e4) - --Special Summon 1 monster from your hand in face-down Defense Position - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,3)) - e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SET) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_HAND) - e5:SetCost(Cost.AND(Cost.SelfReveal,s.spcost)) - e5:SetTarget(s.sptg) - e5:SetOperation(s.spop) - c:RegisterEffect(e5) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsPosition(POS_FACEDOWN_DEFENSE) end) -end -s.counter_place_list={COUNTER_EC} -s.listed_series={SET_ENNEACRAFT} -function s.counterop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not Duel.IsChainSolving() then - c:AddCounter(COUNTER_EC,1) - else - --Place 1 E.C. Counter on this card 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_PZONE) - e1:SetOperation(function() c:AddCounter(COUNTER_EC,1) 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.descon(e,tp,eg,ep,ev,re,r,rp) - local pc=Duel.GetFirstMatchingCard(nil,tp,LOCATION_PZONE,0,e:GetHandler()) - return pc and pc:IsSetCard(SET_ENNEACRAFT) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local atk=e:GetHandler():GetAttack()-1 - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsAttackBelow(atk) end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAttackBelow,atk),tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAttackBelow,atk),tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end -function s.chainlimop(e,tp,eg,ep,ev,re,r,rp) - if ep==1-tp then - Duel.SetChainLimit(function(e,rp,tp) return tp==rp end) - end -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - if not (ep==1-tp and Duel.GetCurrentChain(true)>=3) then return false end - for i=1,ev do - local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) - if te and tgp==1-tp and Duel.IsChainNegatable(i) then - return true - end - end - return false -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local ng=Group.CreateGroup() - local dg=Group.CreateGroup() - for i=1,ev do - local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) - if te and tgp==1-tp and Duel.IsChainNegatable(i) then - local tc=te:GetHandler() - ng:AddCard(tc) - if tc:IsDestructable() and tc:IsRelateToEffect(te) then - dg:AddCard(tc) - end - end - end - Duel.SetTargetCard(dg) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,#ng,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,#dg,tp,0) -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - local negate_chk=false - local dg=Group.CreateGroup() - for i=1,ev do - local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) - if te and tgp==1-tp and Duel.NegateActivation(i) then - negate_chk=true - local tc=te:GetHandler() - if tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) then - tc:CancelToGrave() - dg:AddCard(tc) - end - end - end - if negate_chk then - Duel.Destroy(dg,REASON_EFFECT) - end -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - --You cannot Special Summon the turn you activate this effect, except in face-down Defense Position - 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_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_FORCE_SPSUMMON_POSITION) - e1:SetTargetRange(1,0) - e1:SetValue(POS_FACEDOWN_DEFENSE) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,nil,e,0,tp,false,false,POS_FACEDOWN_DEFENSE) 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,Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,1,nil,e,0,tp,false,false,POS_FACEDOWN_DEFENSE) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c101304021.lua b/pre-release/c101304021.lua deleted file mode 100644 index bfb2efcfee..0000000000 --- a/pre-release/c101304021.lua +++ /dev/null @@ -1,102 +0,0 @@ ---キラーチューン・ロタリー ---Kewl Tune Rotary ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If this card on the field would be used as Synchro Material, 1 Tuner in your hand can be used as 1 of the other materials - Synchro.AddHandMaterialEffect(c,id,function(c) return c:IsType(TYPE_TUNER) end) - --You can reveal this card and 1 other Tuner in your hand; immediately after this effect resolves, Normal Summon 1 Tuner - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.nscost) - e1:SetTarget(s.nstg) - e1:SetOperation(s.nsop) - c:RegisterEffect(e1) - --If this card is sent to the GY as Synchro Material: You can activate 1 of these effects; - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_KEWL_TUNE} -function s.nscostfilter(c) - return c:IsType(TYPE_TUNER) and not c:IsPublic() -end -function s.nscost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsPublic() and Duel.IsExistingMatchingCard(s.nscostfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,s.nscostfilter,tp,LOCATION_HAND,0,1,1,c):GetFirst() - Duel.ConfirmCards(1-tp,Group.FromCards(c,rc)) - Duel.ShuffleHand(tp) -end -function s.nsfilter(c) - return c:IsType(TYPE_TUNER) and c:IsSummonable(true,nil) -end -function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) -end -function s.nsop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() - if sc then - Duel.Summon(tp,sc,true,nil) - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) - local b2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_TODECK) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_GRAVE) - elseif op==2 then - e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_KEWL_TUNE) and c:IsSpellTrap() and c:IsAbleToHand() -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Place 1 card from your opponent's GY on the bottom of the Deck - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) - end - elseif op==2 then - --● Look at your opponent's hand, then you can add 1 "Kewl Tune" Spell/Trap from your Deck to your hand - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if #g==0 then return end - Duel.ConfirmCards(tp,g) - Duel.ShuffleHand(1-tp) - local hg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if #hg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,4)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local hsg=hg:Select(tp,1,1,nil) - if #hsg>0 then - Duel.BreakEffect() - Duel.SendtoHand(hsg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,hsg) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304022.lua b/pre-release/c101304022.lua deleted file mode 100644 index b6afd02f8d..0000000000 --- a/pre-release/c101304022.lua +++ /dev/null @@ -1,107 +0,0 @@ ---精霊術の使い魔 ---Familiars of the Spiritual Arts ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --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:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --change type/attribute - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.chngtg) - e3:SetOperation(s.chngop) - c:RegisterEffect(e3) - --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(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,2}) - e4:SetCondition(s.spcon) - e4:SetTarget(s.sptg) - e4:SetOperation(s.spop) - c:RegisterEffect(e4) -end -s.listed_names={38057522} -s.listed_series={SET_FAMILIAR_POSSESSED,SET_POSSESSED } -function s.thfilter(c) - return c:IsAbleToHand() and (c:IsCode(38057522) or (c:IsSpellTrap() and c:IsSetCard(SET_POSSESSED))) -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.chngtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local race=Duel.AnnounceRace(tp,1,RACE_ALL) - local attr=c:IsRaceExcept(race) and Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL) or c:AnnounceAnotherAttribute(tp) - e:SetLabel(race,attr) -end -function s.chngop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if (not c:IsFaceup() and c:IsRelateToEffect(e)) then return end - local race,attr=e:GetLabel() - if c:IsRaceExcept(race) then - --Change its Monster Type - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetValue(race) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) - end - if c:IsAttributeExcept(attr) then - --Change its Attribute - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e2:SetValue(attr) - e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e2) - end -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return r&(REASON_BATTLE|REASON_EFFECT)>0 -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) and c:IsDefense(1500) 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|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,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/c101304023.lua b/pre-release/c101304023.lua deleted file mode 100644 index 83e8574428..0000000000 --- a/pre-release/c101304023.lua +++ /dev/null @@ -1,90 +0,0 @@ ---仮初の幻臉師 ---Transient Masquerader of Illusion -local s,id=GetID() -function s.initial_effect(c) - --If this card is Normal or Special Summoned: You can send 1 Fiend, Illusion, or Spellcaster monster from your Deck to the GY, then you can change this card's Type to the sent monster's original Type - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_TOGRAVE) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetTarget(s.tgtg) - e1a:SetOperation(s.tgop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --If this card battles a monster, neither can be destroyed by that battle - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(s.indestg) - e2:SetValue(1) - c:RegisterEffect(e2) - --If this card is in your GY: You can banish 1 Spell from your GY; Special Summon this card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) - e3:SetCost(s.spcost) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -function s.tgfilter(c) - return c:IsRace(RACE_FIEND|RACE_ILLUSION|RACE_SPELLCASTER) and c:IsAbleToGrave() -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) then - local original_type=sc:GetOriginalRace() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsRaceExcept(original_type) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - --Change this card's Type to the sent monster's original Type - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetValue(original_type) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end - end -end -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -end -function s.spcostfilter(c) - return c:IsSpell() and c:IsAbleToRemoveAsCost() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -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 \ No newline at end of file diff --git a/pre-release/c101304024.lua b/pre-release/c101304024.lua deleted file mode 100644 index 575e710188..0000000000 --- a/pre-release/c101304024.lua +++ /dev/null @@ -1,106 +0,0 @@ ---調和ノ天救竜 ---Fidraulis Harmonia ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When your opponent activates a monster effect on the field (Quick Effect): You can reveal this card in your hand and up to 5 Synchro Monsters in your Extra Deck; apply these effects in sequence based on the total number revealed, also you cannot activate the effects of monsters Special Summoned from the Extra Deck until the end of your next turn, except Synchro Monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.effcon) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -function s.effcon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsMonsterEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE -end -function s.revealfilter(c) - return c:IsSynchroMonster() and not c:IsPublic() -end -function s.rescon(sg,e,tp,mg) - local b1=#sg==1 - local b2=#sg==3 and sg:IsExists(Card.IsAbleToGrave,1,nil) - local b3=#sg==5 and sg:IsExists(Card.IsAbleToGrave,1,nil) and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - return b1 or b2 or b3 -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(s.revealfilter,tp,LOCATION_EXTRA,0,nil) - if chk==0 then return not c:IsPublic() and #g>0 end - local max_reveal_count=math.min(#g,5) - local sg=aux.SelectUnselectGroup(g,e,tp,1,max_reveal_count,s.rescon,1,tp,HINTMSG_CONFIRM,s.rescon) - Duel.ConfirmCards(1-tp,c) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleExtra(tp) - e:SetLabel(#sg+1) - e:SetLabelObject(sg) - for sc in sg:Iter() do - sc:CreateEffectRelation(e) - end -end -function s.efftg(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 - local reveal_count=e:GetLabel() - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - if reveal_count>=4 then - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) - end - if reveal_count==6 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,0,LOCATION_MZONE),1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local break_chk=false - local reveal_count=e:GetLabel() - if reveal_count>=2 and c:IsRelateToEffect(e) then - --● 2+: Special Summon this card - break_chk=true - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - if reveal_count>=4 then - --● 4+: Send 1 of the revealed Synchro Monsters to the GY - local revealed_synchros=e:GetLabelObject():Match(Card.IsRelateToEffect,nil,e) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=revealed_synchros:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil) - if #g>0 then - if break_chk then Duel.BreakEffect() end - break_chk=true - Duel.SendtoGrave(g,REASON_EFFECT) - end - end - if reveal_count==6 then - --● 6: Destroy 1 monster your opponent controls - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - if break_chk then Duel.BreakEffect() end - Duel.Destroy(g,REASON_EFFECT) - end - end - local reset_count=Duel.IsTurnPlayer(tp) and 2 or 1 - --You cannot activate the effects of monsters Special Summoned from the Extra Deck until the end of your next turn, except Synchro 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_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) - Duel.RegisterEffect(e1,tp) -end -function s.aclimit(e,re,tp) - local rc=re:GetHandler() - return re:IsMonsterEffect() and rc:IsOnField() and rc:IsSummonLocation(LOCATION_EXTRA) - and not rc:IsSynchroMonster() -end \ No newline at end of file diff --git a/pre-release/c101304025.lua b/pre-release/c101304025.lua deleted file mode 100644 index e5fa4b54f3..0000000000 --- a/pre-release/c101304025.lua +++ /dev/null @@ -1,89 +0,0 @@ ---妖光のディアーブロッケン ---Diabrocken of the Ghost Light ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --(Quick Effect): You can banish 1 FIRE monster from your face-up field or GY; Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --If this card is Special Summoned: You can target 1 face-up card on the field; negate its effects until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --If this card is sent to the GY as Link Material: You can Set 1 Quick-Play Spell or Normal Trap from your GY that was sent there this turn - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_SET) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK end) - e3:SetTarget(s.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -function s.spcostfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsFaceup() and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) - end -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsNegatable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) - end -end -function s.setfilter(c,turn_count) - return (c:IsQuickPlaySpell() or c:IsNormalTrap()) and c:GetTurnID()==turn_count and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_GRAVE,0,1,nil,Duel.GetTurnCount()) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil,Duel.GetTurnCount()) - if #g>0 then - Duel.SSet(tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101304026.lua b/pre-release/c101304026.lua deleted file mode 100644 index 4655f1ee50..0000000000 --- a/pre-release/c101304026.lua +++ /dev/null @@ -1,79 +0,0 @@ ---コンベックス・ナイト ---Convex Knight ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If a Machine monster is on the field and this card is in your hand: You can Special Summon this card in Defense Position, then you can make its Level become equal to the Level/Rank of 1 Machine monster on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_MACHINE),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --During your Main Phase: You can send 1 EARTH Machine monster from your Deck to the GY, then this card gains ATK equal to the sent monster's Level x 100 until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - c:RegisterEffect(e2) -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,POS_FACEUP_DEFENSE) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_LVCHANGE,c,1,tp,0) -end -function s.lvfilter(c,lv) - return ((c:HasLevel() and not c:IsLevel(lv)) or (c:HasRank() and not c:IsRank(lv))) - and c:IsRace(RACE_MACHINE) and c:IsFaceup() -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local lv=c:GetLevel() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 - and Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,lv) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local sc=Duel.SelectMatchingCard(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,lv):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - local lv_rnk=(sc:HasLevel() and sc:GetLevel()) - or (sc:HasRank() and sc:GetRank()) - Duel.BreakEffect() - --Make its Level become equal to the Level/Rank of 1 Machine monster on the field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv_rnk) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end -end -function s.tgfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave() -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,0) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) - and c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.BreakEffect() - --This card gains ATK equal to the sent monster's Level x 100 until the end of this turn - c:UpdateAttack(sc:GetLevel()*100,RESETS_STANDARD_DISABLE_PHASE_END) - end -end \ No newline at end of file diff --git a/pre-release/c101304027.lua b/pre-release/c101304027.lua deleted file mode 100644 index 84d3b9607e..0000000000 --- a/pre-release/c101304027.lua +++ /dev/null @@ -1,100 +0,0 @@ ---血樹竜姫ドラセレア ---Draselea the Blood Tree Dragon Princess ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can send 1 Level 4 or lower Plant monster from your Deck to the GY, except "Draselea the Blood Tree Dragon Princess"; Special Summon this card from your hand, and if you do, its Level becomes the sent monster's - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.AND(s.selfspcost,s.effcost)) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --You can banish this card and 1 Plant monster from your GY; Special Summon 1 Dragon monster from your hand or GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.AND(s.dragonspcost,s.effcost)) - e2:SetTarget(s.dragonsptg) - e2:SetOperation(s.dragonspop) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsRace(RACE_DRAGON|RACE_PLANT) end) -end -s.listed_names={id} -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - --You cannot Special Summon the turn you activate either of this card's effects, except Dragon or Plant monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_DRAGON|RACE_PLANT) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.selfspcostfilter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and not c:IsCode(id) 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 sc=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - Duel.SendtoGrave(sc,REASON_COST) - e:SetLabel(sc:GetLevel()) -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) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then - --Its Level becomes the sent monster's - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end - Duel.SpecialSummonComplete() -end -function s.dragonspcostfilter(c,e,tp,handler) - return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.dragonspfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,Group.FromCards(c,handler),e,tp) -end -function s.dragonspfilter(c,e,tp) - return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.dragonspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.dragonspcostfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.dragonspcostfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp,c) - Duel.Remove(g+c,POS_FACEUP,REASON_COST) -end -function s.dragonsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.dragonspfilter,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.dragonspop(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.dragonspfilter),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 \ No newline at end of file diff --git a/pre-release/c101304028.lua b/pre-release/c101304028.lua deleted file mode 100644 index 4606a44aef..0000000000 --- a/pre-release/c101304028.lua +++ /dev/null @@ -1,89 +0,0 @@ ---WAKE CUP! クロ ---WAKE CUP! Kuro ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --FLIP: You can target 1 other face-up monster on the field; change it to face-down Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_POSITION+CATEGORY_SET) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.facedowntg) - e1:SetOperation(s.facedownop) - c:RegisterEffect(e1) - --You can reveal this card in your hand; add 1 WIND Flip monster from your Deck to your hand, except "WAKE CUP! Kuro", then discard 1 card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfReveal) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --(Quick Effect): You can target 1 face-down Defense Position monster on the field; change it to face-up Defense Position - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_POSITION) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.faceuptg) - e3:SetOperation(s.faceupop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -s.listed_names={id} -function s.facedowntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanTurnSet() and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,POS_FACEDOWN_DEFENSE) -end -function s.facedownop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsMonster() then - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) - end -end -function s.thfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_FLIP) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) - end -end -function s.faceuptgfilter(c) - return c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsCanChangePosition() -end -function s.faceuptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.faceuptgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.faceuptgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local tc=Duel.SelectTarget(tp,s.faceuptgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,tc,1,tp,POS_FACEUP_DEFENSE) -end -function s.faceupop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsMonster() then - Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c101304029.lua b/pre-release/c101304029.lua deleted file mode 100644 index 1502b47a76..0000000000 --- a/pre-release/c101304029.lua +++ /dev/null @@ -1,84 +0,0 @@ ---道化の一座 フレア ---Clown Crew Flare ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --You can reveal this card in your hand; add 1 non-Ritual "Clown Crew" card from your Deck to your hand, then discard 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Flare" once per turn) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_RELEASE) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_CLOWN_CREW} -function s.thfilter(c) - return c:IsSetCard(SET_CLOWN_CREW) and not c:IsRitualMonster() 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) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) -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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(aux.AND(Card.IsRitualMonster,Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) - local b2=not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingMatchingCard(aux.AND(Card.IsEffectMonster,Card.IsCanTurnSet),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_TODECK) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_MZONE|LOCATION_GRAVE) - elseif op==2 then - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_POSITION+CATEGORY_SET) - Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_EITHER,POS_FACEDOWN_DEFENSE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Shuffle all Ritual Monsters on the field and in the GYs into the Deck - local g=Duel.GetMatchingGroup(aux.AND(Card.IsRitualMonster,Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) - if #g>0 then - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end - elseif op==2 then - --● Change 1 Effect Monster on the field to face-down Defense Position - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsEffectMonster,Card.IsCanTurnSet),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304030.lua b/pre-release/c101304030.lua deleted file mode 100644 index 12fad1219d..0000000000 --- a/pre-release/c101304030.lua +++ /dev/null @@ -1,79 +0,0 @@ ---デス・レジーナ・デーモン ---Doom Regina Archfiend ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - Pendulum.AddProcedure(c) - c:AddMustBeRitualSummoned() - --You can target 1 "Archfiend" Spell/Trap in your GY or banishment; destroy this card, and if you do, add the targeted card to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If this card is Ritual Summoned: You can destroy as many Spells/Traps your opponent controls as possible, then if this card is in the Extra Monster Zone, you can banish all Spells and Traps from your opponent's GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) - 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) return e:GetHandler():IsRitualSummoned() end) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) - --Unaffected by other monsters' effects while in the Extra Monster Zone - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetRange(LOCATION_EMZONE) - e3:SetValue(function(e,te) return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() end) - c:RegisterEffect(e3) -end -s.listed_series={SET_ARCHFIEND} -s.listed_names={63679166} --"Throne of Archfiends" -function s.thfilter(c) - return c:IsSetCard(SET_ARCHFIEND) and c:IsSpellTrap() and c:IsFaceup() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - 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) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_REMOVED) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and c:IsInExtraMZone() - and Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToRemove),tp,0,LOCATION_GRAVE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - local rg=Duel.GetMatchingGroup(aux.AND(Card.IsSpellTrap,Card.IsAbleToRemove),tp,0,LOCATION_GRAVE,nil) - if #rg>0 then - Duel.BreakEffect() - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304031.lua b/pre-release/c101304031.lua deleted file mode 100644 index d51da63c4d..0000000000 --- a/pre-release/c101304031.lua +++ /dev/null @@ -1,118 +0,0 @@ ---覇王暴竜スターヴ・ヴェノム・ウィング・ドラゴン ---Starving Venom Wing Dragon ---Scripted By The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - Pendulum.AddProcedure(c,false) - --Fusion Materials: 1 Fusion Monster + 1 "Clear Wing" monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_CLEAR_WING)) - --Place Predator Counters on monsters Special Summoned to your opponent's field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_PZONE) - e1:SetOperation(s.counterplaceop) - c:RegisterEffect(e1) - --If your opponent Special Summons a monster(s): You can target 1 of them; this card gains ATK equal to its ATK, and its effects are negated. - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(s.atknegeffcon) - e2:SetTarget(s.atknegefftg) - e2:SetOperation(s.atknegeffop) - c:RegisterEffect(e2) - --When another card or effect is activated on the field: You can destroy 1 card on the field - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler()~=e:GetHandler() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&LOCATION_ONFIELD>0 end) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) - --Place itself into Pendulum Zone if it is destroyed - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_DESTROYED) - e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) - e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end local c=e:GetHandler() if c:IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) end end) - e4:SetOperation(s.penop) - c:RegisterEffect(e4) -end -s.listed_series={SET_CLEAR_WING} -s.material_setcode={SET_CLEAR_WING} -s.counter_place_list={COUNTER_PREDATOR} -function s.counterplaceop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=eg:Filter(Card.IsControler,nil,1-tp) - for tc in g:Iter() do - if tc:AddCounter(COUNTER_PREDATOR,1) and tc:IsLevelAbove(2) then - --It becomes Level 1 as long as it has a Predator Counter - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetCondition(function(e) return e:GetHandler():HasCounter(COUNTER_PREDATOR) end) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - end -end -function s.atknegefffilter(c,e,tp) - return c:IsSummonPlayer(1-tp) and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_MZONE) and c:HasNonZeroAttack() -end -function s.atknegeffcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.atknegefffilter,1,nil,e,tp) -end -function s.atknegefftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return eg:IsContains(chkc) and s.atknegefffilter(chkc,e,tp) end - if chk==0 then return eg:IsExists(s.atknegefffilter,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local tc=nil - if #eg==1 then - tc=eg:GetFirst() - Duel.SetTargetCard(tc) - else - tc=eg:FilterSelect(tp,s.atknegefffilter,1,1,nil,e,tp) - Duel.SetTargetCard(tc) - end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0) -end -function s.atknegeffop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() - and c:UpdateAttack(tc:GetAttack(),RESETS_STANDARD_DISABLE_PHASE_END) and tc:IsNegatableMonster() then - tc:NegateEffects(c,RESETS_STANDARD_PHASE_END) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD),1,tp,LOCATION_ONFIELD) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end -end -function s.penop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) - end -end \ No newline at end of file diff --git a/pre-release/c101304032.lua b/pre-release/c101304032.lua deleted file mode 100644 index 33a74d281e..0000000000 --- a/pre-release/c101304032.lua +++ /dev/null @@ -1,71 +0,0 @@ ---道化の一座 ディアボロ ---Clown Crew Diablo ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2 monsters with the same Attribute but different Types - Fusion.AddProcMixN(c,true,true,s.fusfilter,2) - --If your Tribute Summoned monster attacks a Defense Position monster, inflict double piercing battle damage to your opponent - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsTributeSummoned)) - e1:SetValue(DOUBLE_DAMAGE) - c:RegisterEffect(e1) - --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Diablo" once per turn) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_RELEASE) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_CLOWN_CREW} -function s.fusfilter(c,fc,sumtype,sp,sub,mg,sg) - return not sg or sg:FilterCount(aux.TRUE,c)==0 - or (sg:IsExists(Card.IsAttribute,1,c,c:GetAttribute(),fc,sumtype,sp) and not sg:IsExists(Card.IsRace,1,c,c:GetRace(),fc,sumtype,sp)) -end -function s.setfilter(c) - return c:IsSetCard(SET_CLOWN_CREW) and c:IsTrap() and c:IsSSetable() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(aux.AND(Card.IsFusionMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) - local b2=not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_TOEXTRA) - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,PLAYER_ALL,LOCATION_MZONE|LOCATION_GRAVE) - elseif op==2 then - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_SET) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Return all Fusion Monsters on the field and in the GYs to the Extra Deck - local g=Duel.GetMatchingGroup(aux.AND(Card.IsFusionMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) - if #g>0 then - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end - elseif op==2 then - --● Set 1 "Clown Crew" Trap from your Deck - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304033.lua b/pre-release/c101304033.lua deleted file mode 100644 index 775975c06f..0000000000 --- a/pre-release/c101304033.lua +++ /dev/null @@ -1,95 +0,0 @@ ---妖精伝姫を紡ぐ者 ---Weaver of Fairy Tail Tales ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Fairy Tail" monster + 1 Spellcaster monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FAIRY_TAIL),aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) - --Special Summon 1 "Fairy Tail" monster from your Deck or banishment - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Negate the effects of 1 Effect Monster your opponent controls, also its name becomes "Fairy Prince" - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_DISABLE) - e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetRange(LOCATION_MZONE) - e2a:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e2a:SetCondition(s.discon) - e2a:SetTarget(s.distg) - e2a:SetOperation(s.disop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --Every "Fairy Prince" on the field becomes Spellcaster - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_CHANGE_RACE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(function(e,c) return c:IsCode(CARD_FAIRY_PRINCE) end) - e3:SetValue(RACE_SPELLCASTER) - c:RegisterEffect(e3) -end -s.listed_series={SET_FAIRY_TAIL} -s.listed_names={CARD_FAIRY_PRINCE} -s.material_setcode={SET_FAIRY_TAIL} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_FAIRY_TAIL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) -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|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|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_DECK|LOCATION_REMOVED,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.disconfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsAttributeExcept(ATTRIBUTE_EARTH) and c:IsSetCard(SET_FAIRY_TAIL) and c:IsFaceup() -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.disconfilter,1,nil,tp) -end -function s.disfilter(c) - return c:IsType(TYPE_EFFECT) and c:IsFaceup() and (c:IsNegatableMonster() or not c:IsCode(CARD_FAIRY_PRINCE)) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local c=e:GetHandler() - --Negate its effects - tc:NegateEffects(c) - --Its name becomes "Fairy Prince" - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(CARD_FAIRY_PRINCE) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end diff --git a/pre-release/c101304034.lua b/pre-release/c101304034.lua deleted file mode 100644 index 98440fdf4e..0000000000 --- a/pre-release/c101304034.lua +++ /dev/null @@ -1,92 +0,0 @@ ---妖精伝姫を語る者 ---Chronicler of Fairy Tail Tales ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 LIGHT "Fairy Tail" monster + 1 Spellcaster monster - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) - --Your "Fairy Tail" monsters cannot be destroyed by battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_FAIRY_TAIL) end) - e1:SetValue(1) - c:RegisterEffect(e1) - --Destroy as many cards your opponent controls as possible, and if you do, inflict 500 damage to your opponent for each card destroyed - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,0)) - e2a:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SPSUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,0}) - e2a:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e:GetLabel()==1 end) - e2a:SetTarget(s.destg) - e2a:SetOperation(s.desop) - c:RegisterEffect(e2a) - local e2b=Effect.CreateEffect(c) - e2b:SetType(EFFECT_TYPE_SINGLE) - e2b:SetCode(EFFECT_MATERIAL_CHECK) - e2b:SetValue(function(e,c) e2a:SetLabel(c:GetMaterial():IsExists(Card.IsCode,1,nil,CARD_FAIRY_PRINCE) and 1 or 0) end) - c:RegisterEffect(e2b) - --Negate the activation of an opponent's card or effect, and if you do, destroy that card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - 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(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) - e3:SetCost(s.negcost) - e3:SetTarget(s.negtg) - e3:SetOperation(s.negop) - c:RegisterEffect(e3) -end -s.listed_series={SET_FAIRY_TAIL} -s.listed_names={CARD_FAIRY_PRINCE} -s.material_setcode={SET_FAIRY_TAIL} -function s.matfilter(c,fc,sumtype,tp) - return c:IsAttribute(ATTRIBUTE_LIGHT,fc,sumtype,tp) and c:IsSetCard(SET_FAIRY_TAIL,fc,sumtype,tp) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) - if #g>0 then - local dam=Duel.Destroy(g,REASON_EFFECT)*500 - if dam>0 then - Duel.Damage(1-tp,dam,REASON_EFFECT) - end - end -end -function s.negcostfilter(c) - return c:IsSetCard(SET_FAIRY_TAIL) and c:IsAbleToRemoveAsCost() -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.negcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.negcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=re:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) - if rc:IsDestructable() and rc:IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) - end -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304035.lua b/pre-release/c101304035.lua deleted file mode 100644 index 9a2cdd0aac..0000000000 --- a/pre-release/c101304035.lua +++ /dev/null @@ -1,54 +0,0 @@ ---見えざる手ダンダロス ---Hecahands Dandalos -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2 "Hecahands" monsters - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HECAHANDS),2) - --You can 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_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.ctrltg) - e1:SetOperation(s.ctrlop) - c:RegisterEffect(e1) - --Your "Hecahands" Fusion Monsters and your monsters that are owned by your opponent can attack directly - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(function(e,c) return (c:IsSetCard(SET_HECAHANDS) and c:IsFusionMonster()) or c:IsOwner(1-e:GetHandlerPlayer()) end) - c:RegisterEffect(e2) - --If this card battles a monster, neither can be destroyed by that battle - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(s.indestg) - e3:SetValue(1) - c:RegisterEffect(e3) -end -s.listed_series={SET_HECAHANDS} -function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) 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.ctrlop(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.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -end \ No newline at end of file diff --git a/pre-release/c101304038.lua b/pre-release/c101304038.lua deleted file mode 100644 index 0b2593706a..0000000000 --- a/pre-release/c101304038.lua +++ /dev/null @@ -1,96 +0,0 @@ ---スカーレッド・ハイパーノヴァ・ドラゴン ---Red Hypernova Dragon ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 4 Tuners + 1+ non-Tuner Synchro Monsters - Synchro.AddProcedure(c,nil,4,4,Synchro.NonTunerEx(Card.IsType,TYPE_SYNCHRO),1,99) - --Multiple Tuners - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_MULTIPLE_TUNERS) - c:RegisterEffect(e0) - --Must first be Synchro Summoned with the above materials - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(s.splimit) - c:RegisterEffect(e1) - --atk 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) - --cannot target - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetValue(aux.tgoval) - c:RegisterEffect(e3) - --indes - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetRange(LOCATION_MZONE) - e4:SetValue(aux.indoval) - c:RegisterEffect(e4) - --banish - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,0)) - e5:SetCategory(CATEGORY_REMOVE|CATEGORY_SPECIAL_SUMMON) - e5:SetType(EFFECT_TYPE_QUICK_O) - e5:SetCode(EVENT_FREE_CHAIN) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1) - e5:SetTarget(s.rmtg) - e5:SetOperation(s.rmop) - e5:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e5) -end -s.listed_names={97489701} -s.synchro_nt_required=1 -function s.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA) or ((st&SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO and not se) -end -function s.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_TUNER)*500 -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemove() end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) - g:AddCard(c) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spfilter(c,e,tp) - return c:IsCode(97489701) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) - if c:IsRelateToEffect(e) and c:IsAbleToRemove() then g:AddCard(c) end - if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then - local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) - if #sg>=0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=sg:Select(tp,1,1,nil):GetFirst() - if not sc then return end - sc:SetMaterial(nil) - Duel.BreakEffect() - if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101304039.lua b/pre-release/c101304039.lua deleted file mode 100644 index 5b05d48756..0000000000 --- a/pre-release/c101304039.lua +++ /dev/null @@ -1,67 +0,0 @@ ---捕食植物バアル・テア ---Predaplant Baalthea ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --Special Summon 1 "Predaplant" or "Starving Venom" monster from your face-up Extra Deck or 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_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) - --Fusion Summon 1 Fusion Monster, using monsters from your hand or field as material - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsControler,1,nil,1-tp) end) - e2:SetCost(s.fuscost) - e2:SetTarget(Fusion.SummonEffTG()) - e2:SetOperation(Fusion.SummonEffOP()) - c:RegisterEffect(e2) -end -s.listed_series={SET_PREDAPLANT,SET_STARVING_VENOM} -s.listed_names={CARD_POLYMERIZATION} -function s.spfilter(c,e,tp) - if not (c:IsSetCard({SET_PREDAPLANT,SET_STARVING_VENOM}) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - if c:IsLocation(LOCATION_GRAVE) then - return Duel.GetMZoneCount(tp)>0 - elseif c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_EXTRA|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.fuscostfilter(c) - return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToRemoveAsCost() -end -function s.fuscost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.fuscostfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.fuscostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - g:AddCard(c) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end diff --git a/pre-release/c101304040.lua b/pre-release/c101304040.lua deleted file mode 100644 index bb4256761c..0000000000 --- a/pre-release/c101304040.lua +++ /dev/null @@ -1,79 +0,0 @@ ---道化の一座 メテオ ---Clown Crew Meteor ---scripted by Hatter -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) - --Your opponent cannot activate cards or effects when your monster is Tribute Summoned - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetOperation(s.limop) - c:RegisterEffect(e1) - --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Meteor" once per turn) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_RELEASE) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_CLOWN_CREW} -function s.tsfilter(c,tp) - return c:IsTributeSummoned() and c:IsSummonPlayer(tp) -end -function s.limop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(s.tsfilter,1,nil,tp) then - Duel.SetChainLimitTillChainEnd(function(e,_rp,_tp) return _tp==_rp end) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_CLOWN_CREW) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(aux.AND(Card.IsSynchroMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) - local b2=not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_TOEXTRA) - e:SetProperty(EFFECT_FLAG_DELAY) - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,PLAYER_ALL,LOCATION_MZONE|LOCATION_GRAVE) - elseif op==2 then - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_TOHAND) - e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Return all Synchro Monsters on the field and in the GYs to the Extra Deck - local g=Duel.GetMatchingGroup(aux.AND(Card.IsSynchroMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) - if #g>0 then - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end - elseif op==2 then - --● Target 1 "Clown Crew" card in your GY, except "Clown Crew Meteor"; add it to your hand - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304041.lua b/pre-release/c101304041.lua deleted file mode 100644 index fbf4b8ae31..0000000000 --- a/pre-release/c101304041.lua +++ /dev/null @@ -1,110 +0,0 @@ ---キラーチューン・クラックル ---Kewl Tune Crackle ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: "Kewl Tune Clip" + 1+ Tuners - Synchro.AddProcedure(c,aux.FALSE,1,1,s.tunerfilter,1,99,aux.FilterSummonCode(43904702)) - --If this card is Synchro Summoned: You can look at your opponent's Extra Deck, and if you do, banish (face-up) 1 card from it (until the End Phase), then you can make this card gain ATK equal to the banished monster's - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+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:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.bantg) - e1:SetOperation(s.banop) - c:RegisterEffect(e1) - --If this Synchro Summoned card is sent to the GY: You can Special Summon this card, then you can look at your opponent's Extra Deck, and if you do, banish (face-up) 2 cards from it until the End Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) local c=e:GetHandler() return c:IsSynchroSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Multiple tuners - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_MATERIAL_CHECK) - e3:SetValue(s.valcheck) - c:RegisterEffect(e3) -end -s.listed_names={43904702} --"Kewl Tune Clip" -s.material={43904702} -function s.tunerfilter(c,scard,sumtype,tp) - return c:IsType(TYPE_TUNER,scard,sumtype,tp) or c:IsHasEffect(EFFECT_CAN_BE_TUNER) -end -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 and Duel.IsPlayerCanRemove(tp) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,0) -end -function s.banop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) - if #g==0 then return end - Duel.ConfirmCards(tp,g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rc=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil):GetFirst() - if rc and aux.RemoveUntil(rc,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY,PHASE_END,id,e,tp,s.retop,nil,nil,nil,nil,aux.Stringid(id,2)) - and rc:IsLocation(LOCATION_REMOVED) and rc:IsFaceup() then - local c=e:GetHandler() - local atk=rc:GetAttack() - if c:IsRelateToEffect(e) and c:IsFaceup() and atk>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.BreakEffect() - --Make this card gain ATK equal to the banished monster's - c:UpdateAttack(atk) - end - end - Duel.ShuffleExtra(1-tp) -end -function s.retop(ag) - local facedown_g,faceup_g=ag:Split(Card.IsPreviousPosition,nil,POS_FACEDOWN) - if #facedown_g>0 then - Duel.SendtoDeck(facedown_g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - Duel.ShuffleExtra(facedown_g:GetFirst():GetControler()) - end - if #faceup_g>0 then - Duel.SendtoExtraP(faceup_g,nil,REASON_EFFECT) - end -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_REMOVE,nil,2,1-tp,LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end - local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) - if #g<2 or not Duel.IsPlayerCanRemove(tp) or not Duel.SelectYesNo(tp,aux.Stringid(id,4)) then return end - Duel.BreakEffect() - Duel.ConfirmCards(tp,g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=g:FilterSelect(tp,Card.IsAbleToRemove,2,2,nil) - if #rg==2 then - aux.RemoveUntil(rg,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY,PHASE_END,id,e,tp,s.retop,nil,nil,nil,nil,aux.Stringid(id,5)) - end - Duel.ShuffleExtra(1-tp) -end -function s.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(function(c) return c:IsType(TYPE_TUNER) or c:IsHasEffect(EFFECT_CAN_BE_TUNER) end,2,nil) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_MULTIPLE_TUNERS) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)|RESET_PHASE|PHASE_END) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101304042.lua b/pre-release/c101304042.lua deleted file mode 100644 index 0a1872ca1b..0000000000 --- a/pre-release/c101304042.lua +++ /dev/null @@ -1,86 +0,0 @@ ---キラーチューン B2B ---Kewl Tune Back 2 Back ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ Synchro Monsters - Synchro.AddProcedure(c,nil,1,1,aux.FilterBoolFunctionEx(Card.IsType,TYPE_SYNCHRO),1,99) - --The Levels of monsters your opponent controls are increased by 2 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(2) - c:RegisterEffect(e1) - --Your Tuners can make a second attack during each Battle Phase - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_TUNER)) - e2:SetValue(1) - c:RegisterEffect(e2) - --When your opponent activates a monster effect (Quick Effect): You can target 1 Tuner in your GY or banishment, except a Level 10 monster; either add it to your hand or Special Summon it, then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(2,id) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() end) - e3:SetTarget(s.thsptg) - e3:SetOperation(s.thspop) - c:RegisterEffect(e3) - --Multiple tuners - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_MATERIAL_CHECK) - e4:SetValue(s.valcheck) - c:RegisterEffect(e4) -end -function s.thspfilter(c,e,tp,mmz_chk) - return c:IsType(TYPE_TUNER) and not c:IsLevel(10) and c:IsFaceup() - 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,chkc) - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.thspfilter(chkc,e,tp,mmz_chk) end - if chk==0 then return Duel.IsExistingTarget(s.thspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp,mmz_chk) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) - local g=Duel.SelectTarget(tp,s.thspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp,mmz_chk) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) - if g:GetFirst():IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,tp,0) - end -end -function s.thspop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or not aux.ToHandOrElse(tc,tp, - function() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, - function() return Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 end, - aux.Stringid(id,2) - ) then return end - local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.SynchroSummon(tp,sg:GetFirst()) - end -end -function s.valcheck(e,c) - local g=c:GetMaterial() - if g:IsExists(function(c) return c:IsType(TYPE_TUNER) or c:IsHasEffect(EFFECT_CAN_BE_TUNER) end,2,nil) then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_MULTIPLE_TUNERS) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)|RESET_PHASE|PHASE_END) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101304043.lua b/pre-release/c101304043.lua deleted file mode 100644 index 40446fbcdc..0000000000 --- a/pre-release/c101304043.lua +++ /dev/null @@ -1,88 +0,0 @@ ---超弩級砲塔列車グスタフ・ロケット ---Superdreadnought Rail Cannon Gustav Rocket ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 3 Level 10 monsters, OR by discarding 1 card and using "Superdreadnought Rail Cannon Gustav Max" you control - Xyz.AddProcedure(c,nil,10,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop) - --Negate that effect, and if you do, destroy that monster, then inflict 1000 damage to your opponent - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(s.discon) - e1:SetTarget(s.distg) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --Detach 1 material from this card or destroy it - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e2:SetTarget(s.detachtg) - e2:SetOperation(s.detachop) - c:RegisterEffect(e2) -end -s.listed_names={id,56910167} --"Superdreadnought Rail Cannon Gustav Max" -function s.ovfilter(c,tp,xyzc) - return c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,56910167) and c:IsFaceup() -end -function s.xyzop(e,tp,chk,mc) - if chk==0 then return not Duel.HasFlagEffect(tp,id) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local sc=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil):SelectUnselect(Group.CreateGroup(),tp,false,Xyz.ProcCancellable) - if sc and Duel.SendtoGrave(sc,REASON_DISCARD|REASON_COST)>0 then - return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) - else - return false - end -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsMonsterEffect() and e:GetHandler():GetOverlayCount()>0 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,tp,0) - local rc=re:GetHandler() - if rc:IsDestructable() and rc:IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) - end -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then - Duel.BreakEffect() - Duel.Damage(1-tp,1000,REASON_EFFECT) - end -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_DESTROY,c,1,tp,0) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) -end -function s.detachop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local b1=c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) - local b2=true - --Detach 1 material from this card or destroy it - local op=b1 and Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) or 2 - if op==1 then - c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - elseif op==2 then - Duel.Destroy(c,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304044.lua b/pre-release/c101304044.lua deleted file mode 100644 index 526d42f3a1..0000000000 --- a/pre-release/c101304044.lua +++ /dev/null @@ -1,72 +0,0 @@ ---超弩級砲塔列車フライング・ランチャー ---Superdreadnought Rail Cannon Flying Launcher ---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) - --You can Normal Summon 1 Machine monster during your Main Phase each turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsRace(RACE_MACHINE) end) - c:RegisterEffect(e1) - --Add 1 EARTH Machine monster or "Barrage Blast" 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,0}) - e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --Destroy Spells/Traps on the field equal to the number of materials detached - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.DetachFromSelf(1,function(e,tp) return Duel.GetTargetCount(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) end,function(e,og) e:SetLabel(#og) end)) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) -end -s.listed_names={51369889} --"Barrage Blast" -function s.thfilter(c) - return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE)) or c:IsCode(51369889)) 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.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local ct=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,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/c101304045.lua b/pre-release/c101304045.lua deleted file mode 100644 index a798524ad4..0000000000 --- a/pre-release/c101304045.lua +++ /dev/null @@ -1,83 +0,0 @@ ---終刻竜機ⅩⅢ-グラフレイオ ---DoomZ XIII Over - Graflario ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 3 Level 5 monsters, OR 1 "DoomZ" Xyz Monster you control - Xyz.AddProcedure(c,nil,5,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop) - --You can detach 1 material from this card; add 1 "DoomZ" Spell/Trap from your Deck to your hand, then you can destroy 1 card on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.DetachFromSelf(1)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If this card is destroyed by card effect: You can Special Summon 1 non-Xyz "DoomZ" monster from your Deck or GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_EFFECT) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_DOOMZ} -function s.ovfilter(c,tp,xyzc) - return c:IsSetCard(SET_DOOMZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() -end -function s.xyzop(e,tp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end - return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.thfilter(c) - return c:IsSetCard(SET_DOOMZ) 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) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - if Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #dg>0 then - Duel.HintSelection(dg) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end - end -end -function s.spfilter(c,e,tp) - return not c:IsXyzMonster() and c:IsSetCard(SET_DOOMZ) 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|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,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/c101304046.lua b/pre-release/c101304046.lua deleted file mode 100644 index f2a242e37f..0000000000 --- a/pre-release/c101304046.lua +++ /dev/null @@ -1,67 +0,0 @@ ---道化の一座 デビルズ ---Clown Crew Devils ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 3 monsters - Xyz.AddProcedure(c,nil,3,2) - --Tribute Summoned monsters you control gain 1000 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsTributeSummoned)) - e1:SetValue(1000) - c:RegisterEffect(e1) - --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Devils" once per turn) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_RELEASE) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_CLOWN_CREW} -function s.setfilter(c) - return c:IsSetCard(SET_CLOWN_CREW) and c:IsSpell() and c:IsSSetable() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(aux.AND(Card.IsXyzMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) - local b2=not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_TOEXTRA) - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,PLAYER_ALL,LOCATION_MZONE|LOCATION_GRAVE) - elseif op==2 then - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_SET) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Return all Xyz Monsters on the field and in the GYs to the Extra Deck - local g=Duel.GetMatchingGroup(aux.AND(Card.IsXyzMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) - if #g>0 then - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end - elseif op==2 then - --● Set 1 "Clown Crew" Spell from your Deck - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304047.lua b/pre-release/c101304047.lua deleted file mode 100644 index 06ff71ea9f..0000000000 --- a/pre-release/c101304047.lua +++ /dev/null @@ -1,83 +0,0 @@ ---妖精伝姫-ウィキャット ---Fairy Tail - Wickat ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 Spellcaster monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),4,2) - --"Fairy Tail" monsters you control whose original Attribute is LIGHT are unaffected by your opponent's activated effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_FAIRY_TAIL) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) end) - e1:SetValue(function(e,te) return te:GetOwnerPlayer()==1-e:GetHandlerPlayer() and te:IsActivated() end) - c:RegisterEffect(e1) - --Send that many "Fairy Tail" cards from your Deck to the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(Cost.DetachFromSelf(1,s.tgmaxcost,function(e,og) e:SetLabel(#og) end)) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - c:RegisterEffect(e2) - --Special Summon this card, and if you do, send that monster to the GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -s.listed_series={SET_FAIRY_TAIL} -function s.tgfilter(c) - return c:IsSetCard(SET_FAIRY_TAIL) and c:IsAbleToGrave() -end -function s.tgmaxcost(e,tp) - return math.min(2,Duel.GetMatchingGroupCount(s.tgfilter,tp,LOCATION_DECK,0,nil)) -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,e:GetLabel(),tp,LOCATION_DECK) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local ct=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,ct,ct,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function s.sptgfilter(c) - return c:IsSetCard(SET_FAIRY_TAIL) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGrave() and c:IsFaceup() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.sptgfilter(chkc,tp) end - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.sptgfilter,tp,LOCATION_MZONE,0,1,nil,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,s.sptgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,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.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 - and tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304048.lua b/pre-release/c101304048.lua deleted file mode 100644 index 9b1d9b83b8..0000000000 --- a/pre-release/c101304048.lua +++ /dev/null @@ -1,71 +0,0 @@ ---黒智天至イリスフィール ---Cherubidamn Irisfiel ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 8 monsters, OR 1 Xyz Monster you control that has not activated its effect in the Monster Zone this turn - Xyz.AddProcedure(c,nil,8,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop) - --Keep track of Xyz Monsters that have activated their effect in the Monster Zone each turn - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_CHAIN_SOLVED) - ge1:SetOperation(s.checkop) - Duel.RegisterEffect(ge1,0) - end) - --If this card is Xyz Summoned: You can activate this effect; this turn, Xyz Monsters you control gain ATK equal to their own Rank x 100 during the Battle Phase only - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_ATKCHANGE) - 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:SetOperation(s.atkop) - c:RegisterEffect(e1) - --If this card would be destroyed by battle or card effect, you can detach 1 material from a monster you control instead - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.reptg) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.ovfilter(c,tp,xyzc) - return c:IsXyzMonster() and not c:HasFlagEffect(id) and c:IsFaceup() -end -function s.xyzop(e,tp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end - return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if re:IsMonsterEffect() and rc:IsXyzMonster() and rc:IsRelateToEffect(re) - and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE then - rc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) - end -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) - --This turn, Xyz Monsters you control gain ATK equal to their own Rank x 100 during the Battle Phase only - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTarget(function(e,c) return c:IsXyzMonster() end) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCondition(function() return Duel.IsBattlePhase() end) - e1:SetValue(function(e,c) return c:GetRank()*100 end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) - and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) end - return Duel.SelectEffectYesNo(tp,c,96) and Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT)>0 -end \ No newline at end of file diff --git a/pre-release/c101304049.lua b/pre-release/c101304049.lua deleted file mode 100644 index c4b6304fb3..0000000000 --- a/pre-release/c101304049.lua +++ /dev/null @@ -1,89 +0,0 @@ ---ブリーチヴァレル・ドラゴン ---Breechborrel Dragon ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 DARK Dragon monsters, including a "Rokket" monster - Link.AddProcedure(c,s.matfilter,2,nil,s.matcheck) - --If this card is Link Summoned: You can add 1 "Borrel" Spell/Trap 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) return e:GetHandler():IsLinkSummoned() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --(Quick Effect): You can target 1 DARK monster you control; it gains 500 ATK, or if that monster is no longer on the field, you can Special Summon 1 "Rokket" monster from your Deck in Defense Position instead - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(aux.StatChangeDamageStepCondition) - e2:SetTarget(s.atktg) - e2:SetOperation(s.atkop) - e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_BORREL,SET_ROKKET} -function s.matfilter(c,linkc,st,tp) - return c:IsAttribute(ATTRIBUTE_DARK,linkc,st,tp) and c:IsRace(RACE_DRAGON,linkc,st,tp) -end -function s.matcheck(g,linkc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,SET_ROKKET,linkc,sumtype,tp) -end -function s.thfilter(c) - return c:IsSetCard(SET_BORREL) 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.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttribute(ATTRIBUTE_DARK) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_DARK),tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_DARK),tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - if tc:IsFacedown() then return end - --It gains 500 ATK - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - elseif Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304050.lua b/pre-release/c101304050.lua deleted file mode 100644 index a095808a80..0000000000 --- a/pre-release/c101304050.lua +++ /dev/null @@ -1,69 +0,0 @@ ---四花繚乱の霊使い ---Four Charmers in Profusion ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ monsters - Link.AddProcedure(c,nil,2) - --atk up - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(function(e,c) return 300*Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil):GetBinClassCount(Card.GetAttribute) end) - c:RegisterEffect(e1) - --special summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET|EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spchk(sg,e,tp) - local t=sg:GetClassCount(Card.GetRace) - local a=sg:GetClassCount(Card.GetAttribute) - return (t==1 and a==#sg) or (a==1 and t==#sg) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and aux.SelectUnselectGroup(g,e,tp,2,2,s.spchk,0) end - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.spchk,1,tp,HINTMSG_SPSUMMON) - Duel.SetTargetCard(sg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,#sg,0,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local c=e:GetHandler() - local tg=Duel.GetTargetCards(e) - if #tg==2 and Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)>0 then - local g=Duel.GetOperatedGroup() - if c:IsRelateToEffect(e) then g=g+c end - for tc in g:Iter() do - 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_CANNOT_BE_MATERIAL) - e1:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ,SUMMON_TYPE_LINK)) - e1:SetReset(RESETS_STANDARD_PHASE_END,2) - tc:RegisterEffect(e1) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304051.lua b/pre-release/c101304051.lua deleted file mode 100644 index f2b9af54e3..0000000000 --- a/pre-release/c101304051.lua +++ /dev/null @@ -1,88 +0,0 @@ ---神書の使いラハムゥ ---Lahamu the Messenger of Sacred Scripture ---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) - --Once while this Link Summoned card is face-up on the field, you can Normal Summon 1 Level 5 or higher monster without Tributing - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND,0) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.ntcon) - e1:SetTarget(aux.FieldSummonProcTg(function(e,c) return c:IsLevelAbove(5) end)) - c:RegisterEffect(e1) - --During the Main Phase, you can (Quick Effect): Immediately after this effect resolves, Normal Summon 1 Level 5 or higher DARK monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetTarget(s.nstg) - e2:SetOperation(s.nsop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) - --During your End Phase: You can reveal any number of monsters in your hand and place them on the bottom of the Deck in any order, then draw the same number of cards - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e3:SetTarget(s.drtg) - e3:SetOperation(s.drop) - c:RegisterEffect(e3) -end -function s.ntcon(e,c,minc) - if c==nil then return true end - return e:GetHandler():IsLinkSummoned() and minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end -function s.nsfilter(c) - return c:IsSummonable(true,nil) and c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_DARK) -end -function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) -end -function s.nsop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() - if sc then - Duel.Summon(tp,sc,true,nil) - end -end -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToDeck),tp,LOCATION_HAND,0,1,nil) - and Duel.IsPlayerCanDraw(tp) end - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function s.drop(e,tp,eg,ep,ev,re,r,rp) - local target_player=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local max_count=Duel.GetMatchingGroupCount(aux.AND(Card.IsMonster,Card.IsAbleToDeck),target_player,LOCATION_HAND,0,nil) - if max_count==0 then return end - Duel.Hint(HINT_SELECTMSG,target_player,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(target_player,aux.AND(Card.IsMonster,Card.IsAbleToDeck),target_player,LOCATION_HAND,0,1,max_count,nil) - if #g>0 then - Duel.ConfirmCards(1-target_player,g) - local draw_count=Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) - if draw_count>0 then - if draw_count>1 then Duel.SortDeckbottom(target_player,target_player,draw_count) end - Duel.BreakEffect() - Duel.Draw(target_player,draw_count,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304053.lua b/pre-release/c101304053.lua deleted file mode 100644 index c9b2b3f27d..0000000000 --- a/pre-release/c101304053.lua +++ /dev/null @@ -1,88 +0,0 @@ ---ジャンク・シグナル ---Junk Signal ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -s.listed_names={CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON} -function s.spcostfilter(c,e,tp) - return Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) -end -function s.spfilter(c,e,tp) - return (c:IsCode(CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON) or c:ListsCode(CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON)) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,e,tp) - local ex,_,event_player,event_value,event_reff=Duel.CheckEvent(EVENT_CHAINING,true) - local trig_player,trig_type=nil - if ex then - trig_player,trig_type=Duel.GetChainInfo(event_value-1,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_TYPE) - end - local b2=ex and event_player==1-tp and Duel.IsChainDisablable(event_value) and trig_player==tp and trig_type&TYPE_SYNCHRO>0 - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - local sc=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,e,tp):GetFirst() - Duel.Release(sc,REASON_COST) - e:SetLabelObject(sc) - sc:CreateEffectRelation(e) - elseif op==2 then - e:SetLabel(op,event_value) - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local op=e:GetLabel() - if op==1 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) - elseif op==2 then - e:SetCategory(CATEGORY_DISABLE) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op,event_value=e:GetLabel() - if op==1 then - --Tribute 1 monster; Special Summon 1 "Junk Warrior", 1 "Stardust Dragon", or 1 monster that mentions either of them from your hand, Deck, or GY, except the Tributed monster - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local sc=e:GetLabelObject() - local exc=sc:IsRelateToEffect(e) and sc or nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,exc,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - --When your opponent activates a card or effect in response to the activation of your Synchro Monster's effect: Negate that opponent's effect - Duel.NegateEffect(event_value) - end - local c=e:GetHandler() - --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,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c: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 \ No newline at end of file diff --git a/pre-release/c101304054.lua b/pre-release/c101304054.lua deleted file mode 100644 index 76a2b1f12e..0000000000 --- a/pre-release/c101304054.lua +++ /dev/null @@ -1,79 +0,0 @@ ---特別ダイヤ ---Exceptional Schedule ---scripted by pyrQ -local s,id=GetID() -local TOKEN_SCHEDULE=id+100 -function s.initial_effect(c) - --Add 1 "Special Schedule" or "Urgent Schedule" from your Deck to your hand, then you can Special Summon 1 "Schedule Token" (Machine/EARTH/Level 10/ATK 3000/DEF 3000) to your opponent's field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Send 1 card you control to the GY, and if you do, Special Summon that Level 10 Machine monster in your GY or banishment - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={97520701,25274141,TOKEN_SCHEDULE} --"Special Schedule, "Urgent Schedule" -function s.thfilter(c) - return c:IsCode(97520701,25274141) and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local 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) - Duel.ShuffleHand(tp) - if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SCHEDULE,0,TYPES_TOKEN,3000,3000,10,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP,1-tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - local token=Duel.CreateToken(tp,TOKEN_SCHEDULE) - Duel.BreakEffect() - Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP) - end - end -end -function s.tgfilter(c,tp) - return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGrave() -end -function s.spfilter(c,e,tp) - return c:IsLevel(10) and c:IsRace(RACE_MACHINE) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) - 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_TOGRAVE,nil,1,tp,LOCATION_ONFIELD) - 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() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - if Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) and tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101304055.lua b/pre-release/c101304055.lua deleted file mode 100644 index 46e767e7b1..0000000000 --- a/pre-release/c101304055.lua +++ /dev/null @@ -1,86 +0,0 @@ ---捕食原生 ---Predaprimitive ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Send 1 "Predap" card from your Deck to the GY; add 1 "Polymerization" Spell or "Fusion" Spell from your Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.thcost) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --You can banish this card from your GY, then target 1 Fusion monster you control; destroy it - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(s.descon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_FUSION,SET_PREDAP} -s.listed_names={id} -function s.tgfilter(c,tp) - return c:IsSetCard(SET_PREDAP) and c:IsAbleToGraveAsCost() and not c:IsCode(id) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,c) -end -function s.thfilter(c) - return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp) - Duel.SendtoGrave(g,REASON_COST) -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 - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - --You cannot Special Summon monsters for the rest of the this turn after this card resolves, except Plant and Dragon monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsRace(RACE_PLANT|RACE_DRAGON) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsControler,1,nil,1-tp) -end -function s.desfilter(c) - return c:IsFaceup() and c:IsFusionMonster() -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,0,1,nil) end - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304056.lua b/pre-release/c101304056.lua deleted file mode 100644 index c2b5e553ad..0000000000 --- a/pre-release/c101304056.lua +++ /dev/null @@ -1,82 +0,0 @@ ---絶解なる獄神門-テルミナス ---Unleashed Power Patron Portal - Terminus ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Send 1 "Power Patron" monster from your Deck or Extra Deck to the GY, then you can add 1 DARK Fairy monster from your Deck to your hand, also you cannot declare attacks for the rest of this turn, except with "Power Patron" monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --At the start of the Damage Step, if your "Power Patron" monster battles an opponent's monster: You can banish this card from your GY; banish (face-down) that opponent's monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_START) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.bancon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.bantg) - e2:SetOperation(s.banop) - c:RegisterEffect(e2) -end -s.listed_series={SET_POWER_PATRON} -function s.tgfilter(c) - return c:IsSetCard(SET_POWER_PATRON) and c:IsMonster() and c:IsAbleToGrave() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FAIRY) and c:IsAbleToHand() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil):GetFirst() - if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #sg>0 then - Duel.BreakEffect() - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end - end - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) - --You cannot declare attacks for the rest of this turn, except with "Power Patron" monsters - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return not c:IsSetCard(SET_POWER_PATRON) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.bancon(e,tp,eg,ep,ev,re,r,rp) - local a,b=Duel.GetBattleMonster(tp) - return a and b and a:IsSetCard(SET_POWER_PATRON) and a:IsFaceup() and b:IsAbleToRemove(nil,POS_FACEDOWN) -end -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local _,b=Duel.GetBattleMonster(tp) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,b,1,tp,0) -end -function s.banop(e,tp,eg,ep,ev,re,r,rp) - local _,b=Duel.GetBattleMonster(tp) - if b and b:IsRelateToBattle() and b:IsControler(1-tp) then - Duel.Remove(b,POS_FACEDOWN,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304057.lua b/pre-release/c101304057.lua deleted file mode 100644 index 5ebc5dbca3..0000000000 --- a/pre-release/c101304057.lua +++ /dev/null @@ -1,81 +0,0 @@ ---絶無なる獄神界-ヴィードリア ---Null Power Patron Realm - Vidria ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --You can reveal 1 "Power Patron" monster in your Extra Deck; banish (face-down) 1 card from your hand, then add to your hand, or Special Summon, 1 monster from your Deck that mentions the revealed monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_FZONE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.Reveal(s.revealfilter,false,1,1,function(e,tp,g) e:SetLabel(g:GetFirst():GetCode()) end,LOCATION_EXTRA)) - e1:SetTarget(s.thsptg) - e1:SetOperation(s.thspop) - c:RegisterEffect(e1) - --Monsters your opponent controls lose 100 ATK for each banished card - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetValue(function(e,c) return -100*Duel.GetFieldGroupCount(0,LOCATION_REMOVED,LOCATION_REMOVED) end) - c:RegisterEffect(e2) - --Your opponent cannot activate card effects in the GY while you control "Nerva the Power Patron of Creation", "Jupiter the Power Patron of Destruction", and "Junora the Power Patron of Tuning" - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EFFECT_CANNOT_ACTIVATE) - e3:SetRange(LOCATION_FZONE) - e3:SetTargetRange(0,1) - e3:SetCondition(s.cannotactcon) - e3:SetValue(function(e,re,tp) return re:GetActivateLocation()==LOCATION_GRAVE end) - c:RegisterEffect(e3) -end -s.listed_series={SET_POWER_PATRON} -s.listed_names={53589300,68231287,5914858} --"Nerva the Power Patron of Creation", "Jupiter the Power Patron of Destruction", "Junora the Power Patron of Tuning" -function s.cannotactcon(e) - local tp=e:GetHandlerPlayer() - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,53589300),tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,68231287),tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,5914858),tp,LOCATION_ONFIELD,0,1,nil) -end -function s.revealfilter(c,e,tp) - return c:IsSetCard(SET_POWER_PATRON) and not c:IsPublic() - and Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode(),Duel.GetLocationCount(tp,LOCATION_MZONE)>0) -end -function s.thspfilter(c,e,tp,code,mmz_chk) - return c:ListsCode(code) and c:IsMonster() 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 return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil,nil,POS_FACEDOWN) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.thspop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil,nil,POS_FACEDOWN) - if #g==0 or Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)==0 then return end - local code=e:GetLabel() - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) - local sc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,code,mmz_chk):GetFirst() - if not sc then return end - Duel.BreakEffect() - 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,2) - ) -end \ No newline at end of file diff --git a/pre-release/c101304058.lua b/pre-release/c101304058.lua deleted file mode 100644 index e0bcf8396f..0000000000 --- a/pre-release/c101304058.lua +++ /dev/null @@ -1,79 +0,0 @@ ---終刻反転『A.D.R.A.S.T.E.I.A.』 ---DoomZ Command "A.D.R.A.S.T.E.I.A." ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - aux.AddEquipProcedure(c) - --The first time the equipped monster would be destroyed by battle each turn, it is not destroyed - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetCountLimit(1) - e1:SetValue(function(e,re,r,rp) return (r&REASON_BATTLE)>0 end) - c:RegisterEffect(e1) - --During your Main Phase: You can destroy the equipped monster, and if you do, Special Summon 1 other "DoomZ" monster from your hand, GY, or banishment in Defense Position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --If this card is in your GY: You can target 1 face-up monster you control; equip this card to it, then take damage equal to its Level/Rank x 100 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_EQUIP+CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.eqtg) - e3:SetOperation(s.eqop) - c:RegisterEffect(e3) -end -s.listed_series={SET_DOOMZ} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DOOMZ) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ec=e:GetHandler():GetEquipTarget() - if chk==0 then return Duel.GetMZoneCount(tp,ec)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,ec,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local ec=e:GetHandler():GetEquipTarget() - if ec and Duel.Destroy(ec,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,ec,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end - end -end -function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return c:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() - local lv_rnk=(tc:HasLevel() and tc:GetLevel()) - or (tc:HasRank() and tc:GetRank()) or 0 - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,lv_rnk*100) -end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Equip(tp,c,tc) then - local lv_rnk=(tc:HasLevel() and tc:GetLevel()) - or (tc:HasRank() and tc:GetRank()) or 0 - Duel.BreakEffect() - Duel.Damage(tp,lv_rnk*100,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304059.lua b/pre-release/c101304059.lua deleted file mode 100644 index f5bda5fbc1..0000000000 --- a/pre-release/c101304059.lua +++ /dev/null @@ -1,55 +0,0 @@ ---道化の一座『下稽古』 ---Clown Crew "Rehearsal" ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Tribute 1 monster from your hand or field; add 1 "Clown Crew Biancaviso" and 1 "Clown Crew" Spell/Trap from your Deck to your hand, except "Clown Crew "Rehearsal"" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.thcost) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --You can banish this card from your GY; Ritual Summon 1 "Clown Crew" Ritual Monster from your hand, by Tributing monsters from your hand or field whose total Levels equal or exceed its Level - local e2=Ritual.CreateProc(c,RITPROC_GREATER, - function(c) return c:IsSetCard(SET_CLOWN_CREW) end, - nil,aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - c:RegisterEffect(e2) -end -s.listed_series={SET_CLOWN_CREW} -s.listed_names={101304015,id} --"Clown Crew Biancaviso" -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,nil,1,true,nil,nil) end - local g=Duel.SelectReleaseGroupCost(tp,nil,1,1,true,nil,nil) - Duel.Release(g,REASON_COST) -end -function s.thfilter(c) - return (c:IsCode(101304015) or (c:IsSetCard(SET_CLOWN_CREW) and c:IsSpellTrap() and not c:IsCode(id))) and c:IsAbleToHand() -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsCode,1,nil,101304015) and sg:IsExists(Card.IsSpellTrap,1,nil) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if #g<2 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_ATOHAND) - if #sg==2 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end \ No newline at end of file diff --git a/pre-release/c101304060.lua b/pre-release/c101304060.lua deleted file mode 100644 index 47726357ba..0000000000 --- a/pre-release/c101304060.lua +++ /dev/null @@ -1,106 +0,0 @@ ---道化の一座『開演』 ---Clown Crew "Matinee" ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --During your Main Phase: You can Special Summon 1 "Clown Crew" monster from your Deck or Extra Deck, ignoring its Summoning conditions, also you cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --During the End Phase: You can draw cards equal to the number of monster card types (Ritual, Fusion, Synchro, Xyz, Pendulum, Link) Tributed this turn, then you can Set 1 Spell/Trap from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DRAW+CATEGORY_SET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.drtg) - e2:SetOperation(s.drop) - c:RegisterEffect(e2) - --Keep track of how many monster card types (Ritual, Fusion, Synchro, Xyz, Pendulum, Link) were Tributed each turn - 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_CLOWN_CREW} -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local g=eg:Filter(Card.IsType,nil,TYPE_RITUAL|TYPE_PENDULUM|TYPE_EXTRA) - for rc in g:Iter() do - local card_type=(rc:GetOriginalType()&(TYPE_RITUAL|TYPE_PENDULUM|TYPE_EXTRA)) - local label=Duel.GetFlagEffectLabel(0,id) - if not label or card_type&label==0 then - local new_label=label and (card_type|label) or card_type - Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) - Duel.SetFlagEffectLabel(0,id,new_label) - end - end -end -function s.spfilter(c,e,tp,mmz_chk) - if not (c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end - if c:IsLocation(LOCATION_DECK) then - return mmz_chk - elseif c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end - --You cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next 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_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE|PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end -function s.aclimit(e,re,tp) - local rc=re:GetHandler() - return re:IsMonsterEffect() and rc:IsOnField() and rc:IsSummonLocation(LOCATION_DECK|LOCATION_EXTRA) -end -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetFlagEffect(0,id) - if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) -end -function s.drop(e,tp,eg,ep,ev,re,r,rp) - if Duel.Draw(tp,Duel.GetFlagEffect(0,id),REASON_EFFECT)>0 then - Duel.ShuffleHand(tp) - if Duel.IsExistingMatchingCard(Card.IsSSetable,tp,LOCATION_HAND,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,Card.IsSSetable,tp,LOCATION_HAND,0,1,1,nil) - if #g>0 then - Duel.BreakEffect() - Duel.SSet(tp,g,tp,false) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101304061.lua b/pre-release/c101304061.lua deleted file mode 100644 index bd54fb9a35..0000000000 --- a/pre-release/c101304061.lua +++ /dev/null @@ -1,121 +0,0 @@ ---道化の一座『極芸』 ---Clown Crew "Malabarism" ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon up to 2 "Clown Crew" monsters from your Deck and/or Extra Deck, ignoring their Summoning conditions, also you cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next turn after this card resolves - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - 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 in your GY, except the turn it was sent there: You can banish it and Tribute 1 monster from your hand or field, then target 1 card on the field; return it to the hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(aux.exccon) - e2:SetCost(Cost.AND(Cost.SelfBanish,s.rthcost)) - e2:SetTarget(s.rthtg) - e2:SetOperation(s.rthop) - c:RegisterEffect(e2) -end -s.listed_series={SET_CLOWN_CREW} -function s.spfilter(c,e,tp,mmz_chk) - if not (c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end - if c:IsLocation(LOCATION_DECK) then - return mmz_chk - elseif c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - end -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.pendlinkfilter(c) - return (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()) or c:IsLinkMonster() -end -function s.rescon(mmz_ct,linkmz_ct) - return function(sg,e,tp,mg) - return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=mmz_ct - and sg:FilterCount(s.pendlinkfilter,nil)<=linkmz_ct - end -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if e:IsHasType(EFFECT_TYPE_ACTIVATE) then - --You cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next turn after this card resolves - 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_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE|PHASE_END,2) - Duel.RegisterEffect(e1,tp) - end - local mmz_ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - local emz_ct=Duel.GetLocationCountFromEx(tp,tp,nil,nil,ZONES_EMZ) - local linkmz_ct=Duel.GetLocationCountFromEx(tp,tp) - local ft=math.min(mmz_ct+emz_ct,2) - if ft<=0 then return end - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp,mmz_ct>0) - if #g==0 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) - if #sg==0 then return end - local fup,fdown=sg:Split(s.pendlinkfilter,nil) - local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) - local priority_0,priority_1 - if linkmz_ct0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft>0 then - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp) - if #g>0 then - ft=math.min(ft,3) - local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.spcheck,1,tp,HINTMSG_SPSUMMON) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end - end - --You cannot Special Summon for the rest of this turn, except Spellcaster monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsRace(RACE_SPELLCASTER) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsSSetable() end - if c:IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) - end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SSet(tp,c)>0 then - --It cannot be activated unless you control a "Fairy Tail" monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetCondition(function() return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,0,1,nil) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101304063.lua b/pre-release/c101304063.lua deleted file mode 100644 index c8481f8a3d..0000000000 --- a/pre-release/c101304063.lua +++ /dev/null @@ -1,80 +0,0 @@ ---妖精伝姫の舞踏会 ---Fairy Tail Ball ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: You can add 1 "Fairy Tail" monster or "Fairy Tail Tales" from your Deck or banishment to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Your "Fairy Tail" monsters can attack directly - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_FAIRY_TAIL)) - c:RegisterEffect(e2) - --Negate the effects of 1 Effect Monster your opponent controls, also its name becomes "Fairy Prince" - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1) - e3:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e3:SetTarget(s.distg) - e3:SetOperation(s.disop) - c:RegisterEffect(e3) -end -s.listed_series={SET_FAIRY_TAIL} -s.listed_names={91957038,CARD_FAIRY_PRINCE} --"Fairy Tail Tales" -function s.thfilter(c) - return ((c:IsSetCard(SET_FAIRY_TAIL) and c:IsMonster()) or c:IsCode(91957038)) and c:IsAbleToHand() - and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.disfilter(c) - return c:IsType(TYPE_EFFECT) and c:IsFaceup() and (c:IsNegatableMonster() or not c:IsCode(CARD_FAIRY_PRINCE)) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local c=e:GetHandler() - --Negate its effects - tc:NegateEffects(c) - --Its name becomes "Fairy Prince" - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(CARD_FAIRY_PRINCE) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101304064.lua b/pre-release/c101304064.lua deleted file mode 100644 index 87d24d4647..0000000000 --- a/pre-release/c101304064.lua +++ /dev/null @@ -1,66 +0,0 @@ ---テールズオブ妖精伝姫 ---Tales of Fairy Tail ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - aux.AddEquipProcedure(c) - --The equipped monster gains 1000 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - c:RegisterEffect(e1) - --Fusion Summon 1 Spellcaster Fusion Monster from your Extra Deck, using monsters from your hand or field, when you do, you can also use any "Fairy Prince" your opponent controls - local fusion_params={ - handler=c, - fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER), - extrafil=function(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.FaceupFilter(Card.IsCode,CARD_FAIRY_PRINCE)),tp,0,LOCATION_ONFIELD,nil) end - } - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2) - --Equip this card to a "Fairy Tail" monster on the field, then immediately after this effect resolves, you can Normal Summon 1 Spellcaster monster with 1850 ATK - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_EQUIP+CATEGORY_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,id) - e3:SetTarget(s.eqtg) - e3:SetOperation(s.eqop) - c:RegisterEffect(e3) -end -s.listed_series={SET_FAIRY_TAIL} -s.listed_names={CARD_FAIRY_PRINCE} -function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) -end -function s.nsfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsAttack(1850) and c:IsSummonable(true,nil) -end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local sc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - if Duel.Equip(tp,c,sc) and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local nsc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() - if nsc then - Duel.Summon(tp,nsc,true,nil) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101304065.lua b/pre-release/c101304065.lua deleted file mode 100644 index b4fc8266d2..0000000000 --- a/pre-release/c101304065.lua +++ /dev/null @@ -1,91 +0,0 @@ ---糾罪巧-再巧 ---Enneacraft Reset ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Place 1 "Enneapolis" from your Deck or GY face-up in your Field Zone, or if you control "Enneapolis", you can negate the effects of face-up cards your opponent controls up to the number of cards in your Pendulum Zones instead - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE) - 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) - --If your opponent activates a card or effect while this card is in your GY: You can banish this card; change "Enneacraft" monsters you control to face-down Defense Position up to the number of cards in your Pendulum Zones - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_POSITION+CATEGORY_SET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.postg) - e2:SetOperation(s.posop) - c:RegisterEffect(e2) -end -s.listed_names={17621695} --"Enneapolis" -s.listed_series={SET_ENNEACRAFT} -function s.plfilter(c) - return c:IsCode(17621695) and not c:IsForbidden() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local disable_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,17621695),tp,LOCATION_ONFIELD,0,1,nil) - and Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)>0 - and Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) - return disable_chk or Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_ONFIELD) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local place_chk=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.plfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) - local pzone_card_count=Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0) - local disable_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,17621695),tp,LOCATION_ONFIELD,0,1,nil) - and pzone_card_count>0 - and Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) - local op=1 - if disable_chk then - op=Duel.SelectEffect(tp, - {place_chk,aux.Stringid(id,2)}, - {disable_chk,aux.Stringid(id,3)}) - end - if op==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.plfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() - if sc then - Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) - end - elseif op==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectMatchingCard(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,pzone_card_count,nil) - if #g==0 then return end - Duel.HintSelection(g) - local c=e:GetHandler() - for sc in g:Iter() do - --Negate their effects - sc:NegateEffects(c,nil,true) - end - end -end -function s.posfilter(c) - return c:IsSetCard(SET_ENNEACRAFT) and c:IsCanTurnSet() -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)>0 - and Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,POS_FACEDOWN_DEFENSE) -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local max_count=Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0) - if max_count==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,0,1,max_count,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c101304066.lua b/pre-release/c101304066.lua deleted file mode 100644 index 68fa7de8da..0000000000 --- a/pre-release/c101304066.lua +++ /dev/null @@ -1,71 +0,0 @@ ---憑依共鳴 ---Possessed Resonance ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON|CATEGORY_POSITION|CATEGORY_SET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_POSITION) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.postg) - e2:SetOperation(s.posop) - c:RegisterEffect(e2) -end -s.listed_series={SET_CHARMER,SET_FAMILIAR_POSSESSED} -function s.filter(c,e,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,c:GetAttribute()) -end -function s.spfilter(c,e,tp,att) - return c:IsSetCard({SET_CHARMER,SET_FAMILIAR_POSSESSED}) and c:IsAttribute(att) - and c:IsCanBeSpecialSummoned(e,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,g,1,tp,POS_FACEDOWN_DEFENSE) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetAttribute()) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)~=0 - and tc:IsCanTurnSet() and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) - end - end -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsCanChangePosition() end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end -end \ No newline at end of file diff --git a/pre-release/c101304067.lua b/pre-release/c101304067.lua deleted file mode 100644 index 510937e0aa..0000000000 --- a/pre-release/c101304067.lua +++ /dev/null @@ -1,71 +0,0 @@ ---デーモンの簒奪 ---Archfiend Usurpation ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -s.listed_series={SET_ARCHFIEND} -function s.setfilter(c) - return c:IsSetCard(SET_ARCHFIEND) and c:IsTrap() and c:IsSSetable(true) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - local b1=((e:GetHandler():IsLocation(LOCATION_SZONE) and ft>0) or ft>1) - and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) - local ritual_params={ - lvtype=RITPROC_GREATER, - filter=aux.FilterBoolFunction(Card.IsSetCard,SET_ARCHFIEND), - location=LOCATION_HAND|LOCATION_EXTRA - } - local b2=Ritual.Target(ritual_params)(e,tp,eg,ep,ev,re,r,rp,0) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_SET) - elseif op==2 then - e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - Ritual.Target(ritual_params)(e,tp,eg,ep,ev,re,r,rp,1) - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_EXTRA) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Set 1 "Archfiend" Trap from your Deck or GY, it can be activated this turn - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() - if sc and Duel.SSet(tp,sc)>0 then - --It can be activated this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e1:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e1) - end - elseif op==2 then - --Ritual Summon 1 "Archfiend" Ritual Monster from your hand or face-up Extra Deck, by Tributing monsters from your hand or field whose total Levels equal or exceed its Level - local ritual_params={ - lvtype=RITPROC_GREATER, - filter=aux.FilterBoolFunction(Card.IsSetCard,SET_ARCHFIEND), - location=LOCATION_HAND|LOCATION_EXTRA - } - Ritual.Operation(ritual_params)(e,tp,eg,ep,ev,re,r,rp) - end -end \ No newline at end of file diff --git a/pre-release/c101304068.lua b/pre-release/c101304068.lua deleted file mode 100644 index 02b9179806..0000000000 --- a/pre-release/c101304068.lua +++ /dev/null @@ -1,99 +0,0 @@ ---H・E・R・O フラッシュ! ---H-E-R-O Flash! -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_series={SET_ELEMENTAL_HERO} -function s.thspfilter(c,e,tp,mmz_chk) - return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and (c:IsAbleToHand() - or (mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - local max_count=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_ELEMENTAL_HERO),tp,LOCATION_MZONE,0,nil) - local b1=not Duel.HasFlagEffect(tp,id) - local b2=max_count>0 and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) - local b3=Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,mmz_chk) - local b4=not Duel.HasFlagEffect(tp,id+100) - if chk==0 then return b1 or b2 or b3 or b4 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}, - {b3,aux.Stringid(id,3)}, - {b4,aux.Stringid(id,4)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(0) - e:SetProperty(0) - elseif op==2 then - e:SetCategory(CATEGORY_DESTROY) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,max_count,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - elseif op==3 then - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e:SetProperty(0) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) - elseif op==4 then - e:SetCategory(0) - e:SetProperty(0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - local c=e:GetHandler() - if op==1 then - --● If your "Elemental HERO" monster attacks a Defense Position monster this turn, inflict piercing battle damage to your opponent - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,5)) - --Your "Elemental HERO" monsters inflict piercing battle damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_ELEMENTAL_HERO) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - elseif op==2 then - --● Target cards your opponent controls up to the number of "Elemental HERO" monsters you control; destroy them - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Destroy(tg,REASON_EFFECT) - end - elseif op==3 then - --● Add to your hand, or Special Summon, 1 "Elemental HERO" monster from your GY - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,6)) - local sc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mmz_chk):GetFirst() - if not sc then return end - 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,7) - ) - elseif op==4 then - --● "Elemental HERO" monsters can attack directly this turn - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,8)) - --"Elemental HERO" monsters can attack directly this turn - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(function(e,c) return c:IsSetCard(SET_ELEMENTAL_HERO) end) - e2:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2,tp) - end -end \ No newline at end of file diff --git a/pre-release/c101304069.lua b/pre-release/c101304069.lua deleted file mode 100644 index 88a54c49fa..0000000000 --- a/pre-release/c101304069.lua +++ /dev/null @@ -1,71 +0,0 @@ ---超逸融合 ---Apex Polymerization ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON|CATEGORY_FUSION_SUMMON|CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(Cost.PayLP(2000)) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.filter(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:HasLevel() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) -end -function s.spfilter(c,e,tp,tc) - return c:IsRace(tc:GetRace()) and c:IsAttribute(tc:GetAttribute()) - and c:HasLevel() and not c:IsLevel(tc:GetLevel()) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - if e:IsHasType(EFFECT_TYPE_ACTIVATE) then - Duel.SetChainLimit(aux.FALSE) - end -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then - sc:NegateEffects(e:GetHandler()) - Duel.BreakEffect() - local fusion_params={matfilter=Fusion.OnFieldMat,extrafil=s.fextra(tc,sc)} - local b1=Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) - local b2=sc:IsAbleToGrave() - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - if op==1 then - Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) - elseif op==2 then - Duel.SendtoGrave(sc,REASON_EFFECT) - end - end -end -function s.fextra(tc,sc) - return function(e,tp,mg) - return Group.FromCards(tc),s.fcheck(tc,sc) - end -end -function s.fcheck(tc,sc) - return function(tp,sg,fc) - return #sg==2 and sg:IsContains(tc) and sg:IsContains(sc) - end -end diff --git a/pre-release/c101304070.lua b/pre-release/c101304070.lua deleted file mode 100644 index 4879939016..0000000000 --- a/pre-release/c101304070.lua +++ /dev/null @@ -1,72 +0,0 @@ ---2つに1つ ---One of Two ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Reveal 1 monster and 2 Traps from your Deck, your opponent randomly picks 1, you look at the rest and banish 1 Trap, then your opponent chooses 1 of these effects for you to apply - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsMonster,1,nil) and sg:IsExists(Card.IsTrap,2,nil) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(aux.OR(Card.IsMonster,Card.IsTrap),tp,LOCATION_DECK,0,nil) - if chk==0 then return #g>=3 and Duel.IsPlayerCanRemove(tp) and aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerCanRemove(tp) then return end - local g=Duel.GetMatchingGroup(aux.OR(Card.IsMonster,Card.IsTrap),tp,LOCATION_DECK,0,nil) - if #g<3 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_CONFIRM) - if #sg==0 then return end - local opp=1-tp - Duel.ConfirmCards(opp,sg) - local picked_card=sg:RandomSelect(opp,1):GetFirst() - sg:RemoveCard(picked_card) - Duel.ConfirmCards(tp,sg) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local banished_card=sg:FilterSelect(tp,aux.AND(Card.IsTrap,Card.IsAbleToRemove),1,1,nil) - if #banished_card==0 or Duel.Remove(banished_card,POS_FACEUP,REASON_EFFECT)==0 then return end - sg:RemoveCard(banished_card) - local op=Duel.SelectEffect(opp, - {true,aux.Stringid(id,1)}, - {true,aux.Stringid(id,2)}) - Duel.BreakEffect() - if op==1 then - --● Show the picked card, and if it is a monster, either add it to your hand or Special Summon it. Otherwise, banish it. Shuffle the remaining card into the Deck - Duel.ConfirmCards(opp,picked_card) - if picked_card:IsMonster() then - aux.ToHandOrElse(picked_card,tp, - function() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and picked_card:IsCanBeSpecialSummoned(e,0,tp,false,false) - end, - function() - Duel.SpecialSummon(picked_card,0,tp,tp,false,false,POS_FACEUP) - end, - aux.Stringid(id,3) - ) - else - Duel.Remove(picked_card,POS_FACEUP,REASON_EFFECT) - end - elseif op==2 then - --● Show the card that was not picked nor banished, and if it is a monster, add it to your hand. Otherwise, banish it. Shuffle the remaining card into the Deck - local other_card=sg:GetFirst() - Duel.ConfirmCards(opp,other_card) - if other_card:IsMonster() then - Duel.SendtoHand(other_card,nil,REASON_EFFECT) - else - Duel.Remove(other_card,POS_FACEUP,REASON_EFFECT) - end - end - Duel.ShuffleDeck(tp) -end \ No newline at end of file diff --git a/pre-release/c101304072.lua b/pre-release/c101304072.lua deleted file mode 100644 index bfdf339bda..0000000000 --- a/pre-release/c101304072.lua +++ /dev/null @@ -1,58 +0,0 @@ ---アルトメギア・インパスト -奪還- ---Artmage Impact -Recapture- ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If you control an "Artmage" monster, you can activate this card the turn it was Set - 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:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ARTMAGE),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end) - c:RegisterEffect(e0) - --When your opponent activates a monster effect: Banish 1 Fusion Monster you control (until the End Phase), and if you do, negate the activation, and if you do that, destroy that card, then if you have 3 or more different Monster Types on your field, you can return all Spells/Traps your opponent controls to the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_series={SET_ARTMAGE} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) -end -function s.banfilter(c) - return c:IsFusionMonster() and c:IsFaceup() and c:IsAbleToRemove() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.banfilter,tp,LOCATION_MZONE,0,1,nil) end - local rc=re:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) - if rc:IsDestructable() and rc:IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_ONFIELD) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.banfilter,tp,LOCATION_MZONE,0,1,1,nil) - if #g==0 then return end - Duel.HintSelection(g) - if aux.RemoveUntil(g,nil,REASON_EFFECT,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) and Duel.NegateActivation(ev) - and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 - and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetBinClassCount(Card.GetRace)>=3 - and Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - local rg=Duel.GetMatchingGroup(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,nil) - if #rg>0 then - Duel.BreakEffect() - Duel.SendtoHand(rg,nil,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304073.lua b/pre-release/c101304073.lua deleted file mode 100644 index 95c9ff48c0..0000000000 --- a/pre-release/c101304073.lua +++ /dev/null @@ -1,153 +0,0 @@ ---道化の一座『怪演』 ---Clown Crew "Soiree" ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects (but you can only use each of these effects of "Clown Crew "Soiree"" once per turn) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --During the Main Phase: You can banish this card from your GY; immediately after this effect resolves, Tribute Summon 1 "Clown Crew" monster face-up - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.tribsumtg) - e2:SetOperation(s.tribsumop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -s.listed_series={SET_CLOWN_CREW} -function s.spfilter(c,e,tp,mmz_chk) - if not (c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end - if c:IsLocation(LOCATION_DECK) then - return mmz_chk - elseif c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - end -end -function s.thfilter(c) - return c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and c:IsAbleToHand() -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-100) - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) - local b2=not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local cost_skip=e:GetLabel()~=-100 - local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) - local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+100)) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then e:SetLabel(0) return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) - elseif op==2 then - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - if not cost_skip then Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - end -end -function s.pendlinkfilter(c) - return (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()) or c:IsLinkMonster() -end -function s.rescon(mmz_ct,linkmz_ct) - return function(sg,e,tp,mg) - return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=mmz_ct - and sg:FilterCount(s.pendlinkfilter,nil)<=linkmz_ct - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - if e:IsHasType(EFFECT_TYPE_ACTIVATE) then - --You cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next turn after this card resolves - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE|PHASE_END,2) - Duel.RegisterEffect(e1,tp) - end - local op=e:GetLabel() - if op==1 then - --● Special Summon up to 2 "Clown Crew" monsters from your Deck and/or Extra Deck, ignoring their Summoning conditions - local mmz_ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - local emz_ct=Duel.GetLocationCountFromEx(tp,tp,nil,nil,ZONES_EMZ) - local linkmz_ct=Duel.GetLocationCountFromEx(tp,tp) - local ft=math.min(mmz_ct+emz_ct,2) - if ft<=0 then return end - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp,mmz_ct>0) - if #g==0 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) - if #sg==0 then return end - local fup,fdown=sg:Split(s.pendlinkfilter,nil) - local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) - local priority_0,priority_1 - if linkmz_ct0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.aclimit(e,re,tp) - local rc=re:GetHandler() - return re:IsMonsterEffect() and rc:IsOnField() and rc:IsSummonLocation(LOCATION_DECK|LOCATION_EXTRA) -end -function s.tribsumfilter(c) - return c:IsSetCard(SET_CLOWN_CREW) and c:IsSummonable(true,nil,1) -end -function s.tribsumtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tribsumfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.tribsumop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.tribsumfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() - if sc then - Duel.Summon(tp,sc,true,nil,1) - end -end \ No newline at end of file diff --git a/pre-release/c101304074.lua b/pre-release/c101304074.lua deleted file mode 100644 index 33823907f9..0000000000 --- a/pre-release/c101304074.lua +++ /dev/null @@ -1,111 +0,0 @@ ---道化の一座『新加入』 ---Clown Crew "New Face" ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --During the Standby Phase: You can shuffle 3 "Clown Crew" cards from your GY and/or banishment into the Deck, then draw 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function() return Duel.IsStandbyPhase() end) - e1:SetTarget(s.tdtg) - e1:SetOperation(s.tdop) - e1:SetHintTiming(TIMING_STANDBY_PHASE) - c:RegisterEffect(e1) - --If you Tribute Summon a monster: You can target other Spells/Traps on the field, up to the number of monsters Tributed for its Tribute Summon; destroy them - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.descon) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) - --If this card is sent to the GY, except from the field: You can place this card face-up on your field - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e) return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) - e3:SetTarget(s.pltg) - e3:SetOperation(s.plop) - c:RegisterEffect(e3) -end -s.listed_series={SET_CLOWN_CREW} -function s.tdfilter(c) - return c:IsSetCard(SET_CLOWN_CREW) and c:IsFaceup() and c:IsAbleToDeck() -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp) - and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,3,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,3,nil) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,3,3,nil) - if #g==0 then return end - Duel.HintSelection(g) - if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then - if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - if Duel.IsPlayerCanDraw(tp) then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end - end -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local ec=eg:GetFirst() - if not (ec:IsSummonPlayer(tp) and ec:IsTributeSummoned()) then return false end - local mat_count=ec:GetMaterialCount() - if mat_count>e:GetLabel() then - e:SetLabel(mat_count) - end - return mat_count>0 -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() and chkc~=c end - if chk==0 then - local mat_count=e:GetLabel() - e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1,mat_count) - return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) - end - local max_count=c:GetFlagEffectLabel(id) - c:ResetFlagEffect(id) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,max_count,c) - 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 -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end -end \ No newline at end of file diff --git a/pre-release/c101304075.lua b/pre-release/c101304075.lua deleted file mode 100644 index b546a2048c..0000000000 --- a/pre-release/c101304075.lua +++ /dev/null @@ -1,70 +0,0 @@ ---見えざる導き手 ---Bayt'al-Hecahands -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --You can Tribute 1 monster you control that is a "Hecahands" monster or a monster owned by your opponent; take control of 1 monster your opponent controls - 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_SZONE) - e1:SetCountLimit(1,id) - e1:SetCost(s.ctrlcost) - e1:SetTarget(s.ctrltg) - e1:SetOperation(s.ctrlop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --Once per turn, during your End Phase: Send 1 card you control to the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - c:RegisterEffect(e2) -end -s.listed_series={SET_HECAHANDS} -function s.ctrlcostfilter(c,tp,opp) - return (c:IsSetCard(SET_HECAHANDS) or c:IsOwner(opp)) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 - and Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,c) -end -function s.ctrlcost(e,tp,eg,ep,ev,re,r,rp,chk) - local opp=1-tp - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.ctrlcostfilter,1,false,nil,nil,tp,opp) end - local g=Duel.SelectReleaseGroupCost(tp,s.ctrlcostfilter,1,1,false,nil,nil,tp,opp) - Duel.Release(g,REASON_COST) -end -function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) -end -function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.GetControl(g,tp) - end -end -function s.tgtg(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_ONFIELD) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoGrave(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304076.lua b/pre-release/c101304076.lua deleted file mode 100644 index 8cff5ab402..0000000000 --- a/pre-release/c101304076.lua +++ /dev/null @@ -1,78 +0,0 @@ ---ノーザンクロスファイア ---Northern Cross Fire ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If the total Levels of monsters you control are 10 or higher: Take 1 Level 10 monster from your hand or Deck, and either add it to your hand or Special Summon it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp) return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetSum(Card.GetLevel)>=10 end) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --If the total Levels of monsters your opponent controls are 10 or higher: You can banish this card and 1 Level 10 monster from your GY, then target 1 card your opponent controls; banish it - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp) return Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetSum(Card.GetLevel)>=10 end) - e2:SetCost(s.bancost) - e2:SetTarget(s.bantg) - e2:SetOperation(s.banop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -function s.thspfilter(c,e,tp,sp_chk) - return c:IsLevel(10) and (c:IsAbleToHand() or (sp_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,sp_chk) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local sc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp,sp_chk):GetFirst() - if not sc then return end - aux.ToHandOrElse(sc,tp, - function() return sp_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,3) - ) -end -function s.bancostfilter(c) - return c:IsLevel(10) and c:IsAbleToRemoveAsCost() -end -function s.bancost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.bancostfilter,tp,LOCATION_GRAVE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.bancostfilter,tp,LOCATION_GRAVE,0,1,1,c) - Duel.Remove(g+c,POS_FACEUP,REASON_COST) -end -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) -end -function s.banop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304077.lua b/pre-release/c101304077.lua deleted file mode 100644 index 0838fbda1c..0000000000 --- a/pre-release/c101304077.lua +++ /dev/null @@ -1,68 +0,0 @@ ---霆王の閃光 ---Dominus Spark -local s,id=GetID() -function s.initial_effect(c) - --During the turn in which your opponent has activated a monster effect in the hand or GY, you can activate this card from your hand - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_TRAP_ACT_IN_HAND) - e0:SetCondition(function(e) return Duel.GetCustomActivityCount(id,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 end) - c:RegisterEffect(e0) - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) - --Target 1 monster your opponent controls; banish it, then if you have no Traps in your GY, your opponent can Special Summon 1 monster from their hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -function s.chainfilter(re,tp,cid) - return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0) -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:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end - local act_from_hand_chk=e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) and 1 or 0 - e:SetLabel(act_from_hand_chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_HAND) -end -function s.spfilter(c,e,opp) - return c:IsCanBeSpecialSummoned(e,0,opp,false,false) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local opp=1-tp - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 - and not Duel.IsExistingMatchingCard(Card.IsTrap,tp,LOCATION_GRAVE,0,1,nil) - and Duel.GetLocationCount(opp,LOCATION_MZONE,opp)>0 - and Duel.IsExistingMatchingCard(s.spfilter,opp,LOCATION_HAND,0,1,nil,e,opp) - and Duel.SelectYesNo(opp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(opp,s.spfilter,opp,LOCATION_HAND,0,1,1,nil,e,opp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,opp,opp,false,false,POS_FACEUP) - end - end - if e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()==1 then - --If you activated this card from your hand, you cannot activate the effects of EARTH, WATER, FIRE, and WIND monsters for the rest of this Duel - 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_ACTIVATE) - e1:SetTargetRange(1,0) - e1:SetValue(function(e,re) return re:IsMonsterEffect() and re:GetHandler():IsAttribute(ATTRIBUTE_EARTH|ATTRIBUTE_WATER|ATTRIBUTE_FIRE|ATTRIBUTE_WIND) end) - Duel.RegisterEffect(e1,tp) - end -end \ No newline at end of file diff --git a/pre-release/c101304078.lua b/pre-release/c101304078.lua deleted file mode 100644 index ce26c07b9d..0000000000 --- a/pre-release/c101304078.lua +++ /dev/null @@ -1,52 +0,0 @@ ---サモンショック ---Summon Shock -local s,id=GetID() -local COUNTER_SUMMON=0x148 -function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_SUMMON) - c:SetCounterLimit(COUNTER_SUMMON,4) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - e0:SetHintTiming(0,TIMING_STANDBY_PHASE) - c:RegisterEffect(e0) - --Each time a monster(s) is Normal or Special Summoned, place 1 Summon Counter on this card (max. 4) - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetRange(LOCATION_SZONE) - e1a:SetOperation(s.counterop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --If the 4th Summon Counter is placed on this card: Remove all Summon Counters from this card, and if you do, send all monsters on the field to the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_CUSTOM+id) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - c:RegisterEffect(e2) -end -s.counter_place_list={COUNTER_SUMMON} -function s.counterop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:AddCounter(COUNTER_SUMMON,1) and c:GetCounter(COUNTER_SUMMON)==4 then - Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id,re,0,0,tp,0) - end -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_MZONE) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) - if c:IsRelateToEffect(e) and c:RemoveCounter(tp,COUNTER_SUMMON,c:GetCounter(COUNTER_SUMMON),REASON_EFFECT) - and c:GetCounter(COUNTER_SUMMON)==0 and #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304079.lua b/pre-release/c101304079.lua deleted file mode 100644 index 511b752429..0000000000 --- a/pre-release/c101304079.lua +++ /dev/null @@ -1,98 +0,0 @@ ---神の密告 ---Solemn Report ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can activate this card the turn it was Set, by revealing 1 other Set Trap you control - local e0=Effect.CreateEffect(c) - e0:SetDescription(aux.Stringid(id,0)) - 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(aux.AND(Card.IsFacedown,Card.IsTrap),e:GetHandlerPlayer(),LOCATION_SZONE,0,1,e:GetHandler()) end) - c:RegisterEffect(e0) - --When a Spell/Trap Card is activated: Activate 1 of these effects; - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end) - e1:SetCost(Cost.AND(s.revealcost,s.paylpcost)) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetLabelObject(e0) - c:RegisterEffect(e1) -end -function s.revealcost(e,tp,eg,ep,ev,re,r,rp,chk) - local label_obj=e:GetLabelObject() - if chk==0 then label_obj:SetLabel(0) return true end - if label_obj:GetLabel()>0 then - label_obj:SetLabel(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsFacedown,Card.IsTrap),tp,LOCATION_SZONE,0,1,1,e:GetHandler()) - Duel.ConfirmCards(1-tp,g) - end -end -function s.banish_activation_chk(e,tp) - local re=Duel.GetChainInfo(Duel.GetCurrentChain(),CHAININFO_TRIGGERING_EFFECT) - local rc=re:GetHandler() - return rc:IsAbleToRemove(tp) or (not rc:IsRelateToEffect(re) and Duel.IsPlayerCanRemove(tp)) -end -s.paylpcost=Cost.Choice( - {Cost.PayLP(1500),aux.Stringid(id,2),aux.TRUE}, - {Cost.PayLP(3000),aux.Stringid(id,3),s.banish_activation_chk} -) -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local op=e:GetLabel() - local rc=re:GetHandler() - local relation=rc:IsRelateToEffect(re) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) - if op==1 then - e:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - if rc:IsDestructable() and relation then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) - end - elseif op==2 then - e:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) - 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 -end -function s.banfilter(c,code,opp) - return c:IsOriginalCodeRule(code) and c:IsAbleToRemove(opp) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - local rc=re:GetHandler() - local code=rc:GetOriginalCodeRule() - if op==1 then - --● Pay 1500 LP; negate the activation, and if you do, destroy that card, and if you do that, for the rest of this turn, neither player can activate cards, or the effects of cards, with its same original name - if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then - --For the rest of this turn, neither player can activate cards, or the effects of cards, with its same original name - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetTargetRange(1,1) - e1:SetValue(function(e,re,tp) return re:GetHandler():IsOriginalCodeRule(code) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - end - elseif op==2 then - --● Pay 3000 LP; negate the activation, and if you do, banish that card, then your opponent banishes all cards with its same original name from their hand and Deck - if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)>0 then - local opp=1-tp - local g=Duel.GetMatchingGroup(s.banfilter,tp,0,LOCATION_HAND|LOCATION_DECK,nil,code,opp) - if #g>0 then - Duel.BreakEffect() - Duel.Remove(g,POS_FACEUP,REASON_EFFECT,nil,opp) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101304080.lua b/pre-release/c101304080.lua deleted file mode 100644 index 5333678556..0000000000 --- a/pre-release/c101304080.lua +++ /dev/null @@ -1,75 +0,0 @@ ---動点するP ---Moving Point Pendulum ---scripted by pyrQ -local s,id=GetID() -local COUNTER_T=0x218 -function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_T) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Once per turn, during the Standby Phase: Place 1 T Counter on this card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1) - e1:SetOperation(function(e) e:GetHandler():AddCounter(COUNTER_T,1) end) - c:RegisterEffect(e1) - --Once per turn: You can target 1 Pendulum Monster in your Main Monster Zone; move that Pendulum Monster to an unused adjacent Main Monster Zone a number of times equal to the number of T Counters on this card, then if your opponent controls in the targeted monster's column a Fusion and/or Xyz Monster(s) with a Level/Rank equal to or lower than the targeted monster's Pendulum Scale, destroy as many of them as possible, and if you do, inflict damage to your opponent equal to the total ATK the destroyed monsters had on the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e) return e:GetHandler():HasCounter(COUNTER_T) end) - e2:SetTarget(s.movetg) - e2:SetOperation(s.moveop) - e2:SetHintTiming(TIMING_STANDBY_PHASE,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -function s.movefilter(c) - return c:IsPendulumMonster() and c:IsFaceup() and c:CheckAdjacent() -end -function s.movetg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingTarget(s.movefilter,tp,LOCATION_MMZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.movefilter,tp,LOCATION_MMZONE,0,1,1,nil) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE) - Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) -end -function s.desfilter(c,opp,scale) - if not ((c:IsFusionMonster() or c:IsXyzMonster()) and c:IsFaceup() and c:IsControler(opp)) then return false end - if c:HasLevel() then - return c:IsLevelBelow(scale) - elseif c:HasRank() then - return c:IsRankBelow(scale) - end -end -function s.moveop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not (c:IsRelateToEffect(e) and c:HasCounter(COUNTER_T)) then return end - local tc=Duel.GetFirstTarget() - local move_count=c:GetCounter(COUNTER_T) - if tc:IsRelateToEffect(e) and tc:IsPendulumMonster() and tc:IsFaceup() then - for i=1,move_count do - tc:MoveAdjacent() - end - end - local opp=1-tp - local column_g=tc:GetColumnGroup():Match(s.desfilter,nil,opp,tc:GetScale()) - if #column_g==0 then return end - Duel.BreakEffect() - if Duel.Destroy(column_g,REASON_EFFECT)==0 then return end - local total_atk=Duel.GetOperatedGroup():GetSum(Card.GetPreviousAttackOnField) - if total_atk>0 then - Duel.Damage(opp,total_atk,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304101.lua b/pre-release/c101304101.lua deleted file mode 100644 index 84294b58b0..0000000000 --- a/pre-release/c101304101.lua +++ /dev/null @@ -1,103 +0,0 @@ ---ダークネス・リゾネーター ---Darkness Resonator ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.Reveal(function(c) return c:IsCode(CARD_RED_DRAGON_ARCHFIEND) end,nil,1,1,nil,LOCATION_EXTRA)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Apply a "during your Main Phase this turn, you can Normal Summon 1 "Resonator" monster in addition to your Normal Summon/Set (you can only gain this effect once per turn)" effect - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsPlayerCanAdditionalSummon(tp) end) - e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanSummon(tp) end end) - e2:SetOperation(s.extransop) - c:RegisterEffect(e2) - --Change the Levels of any number of Tuners you control to 1 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_LVCHANGE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.lvtg) - e3:SetOperation(s.lvop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -s.listed_series={SET_RESONATOR} -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 - --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,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c: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.extransop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,4)) - --During your Main Phase this turn, you can Normal Summon 1 "Resonator" monster in addition to your Normal Summon/Set (you can only gain this effect once per turn) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,5)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_RESONATOR) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.lvfilter(c) - return c:IsType(TYPE_TUNER) and not c:IsLevel(1) and c:IsFaceup() -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end - local max_ct=Duel.GetTargetCount(s.lvfilter,tp,LOCATION_MZONE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,max_ct,nil) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,tp,1) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tg=Duel.GetTargetCards(e) - for tc in tg:Iter() do - --Their Levels become 1 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCategory(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101304102.lua b/pre-release/c101304102.lua deleted file mode 100644 index 85f371a4e2..0000000000 --- a/pre-release/c101304102.lua +++ /dev/null @@ -1,97 +0,0 @@ ---パワー・バイス・ドラゴン ---Power Vice Dragon ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --A "Red Dragon Archfiend" that was Synchro Summoned using this card as material cannot be destroyed by battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_BE_MATERIAL) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsCode(CARD_RED_DRAGON_ARCHFIEND) end) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Special Summon this card from your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 "Resonator" monster 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.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -s.listed_series={SET_RESONATOR} -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local rc=c:GetReasonCard() - --Cannot be destroyed by battle - local e1=Effect.CreateEffect(c) - e1:SetDescription(3000) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(1) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - rc:RegisterEffect(e1) -end -function s.spconfilter(c) - return not (c:IsAttribute(ATTRIBUTE_DARK) and c:IsSynchroMonster() and c:IsFaceup()) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,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:IsSetCard(SET_RESONATOR) 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 - local c=e:GetHandler() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except DARK 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:IsAttribute(ATTRIBUTE_DARK) and 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:IsOriginalAttribute(ATTRIBUTE_DARK) and c:IsOriginalType(TYPE_SYNCHRO)) end) -end \ No newline at end of file diff --git a/pre-release/c101304103.lua b/pre-release/c101304103.lua deleted file mode 100644 index e092ccd86d..0000000000 --- a/pre-release/c101304103.lua +++ /dev/null @@ -1,93 +0,0 @@ ---デモン・ピース・ゴーレム ---Fiend Piece Golem ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.selfspcon) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --Decrease this card's Level by up to 2 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_LVCHANGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsLevelAbove(2) end end) - e2:SetOperation(s.lvchangeop) - c:RegisterEffect(e2) - --Special Summon 1 Level 4 or lower Fiend monster from your GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.gyspcon) - e3:SetTarget(s.gysptg) - e3:SetOperation(s.gyspop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -function s.selfspconfilter(c) - return c:IsRace(RACE_FIEND) and c:IsType(TYPE_TUNER) and c:IsFaceup() -end -function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.selfspconfilter,tp,LOCATION_MZONE,0,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) 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.lvchangeop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsLevelAbove(2) then - local b1=c:IsLevelAbove(2) - local b2=c:IsLevelAbove(3) - local lv=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) - --Decrease its Level by up to 2 - c:UpdateLevel(-lv,RESET_EVENT|RESETS_STANDARD_DISABLE) - end -end -function s.gyspcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local sync=c:GetReasonCard() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and (sync:IsCode(CARD_RED_DRAGON_ARCHFIEND) or sync:ListsCode(CARD_RED_DRAGON_ARCHFIEND)) -end -function s.gyspfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.gyspfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) 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) -end -function s.gyspop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c101304104.lua b/pre-release/c101304104.lua deleted file mode 100644 index 4135357721..0000000000 --- a/pre-release/c101304104.lua +++ /dev/null @@ -1,86 +0,0 @@ ---スカーレッド・ノヴァ・ドラゴン/バスター ---Red Nova Dragon/Assault Mode ---Scripted by The Razgriz -local s,id=GetID() -local CARD_RED_NOVA_DRAGON=97489701 -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustBeSpecialSummoned() - --Banish cards your opponent controls, up to the number of Tuners in your GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e1:SetCost(s.tempbanishcost) - e1:SetTarget(s.rmtg) - e1:SetOperation(s.rmop) - c:RegisterEffect(e1) - --Negate the attack and end Battle Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) - e2:SetCost(s.tempbanishcost) - e2:SetOperation(s.negbpop) - c:RegisterEffect(e2) - --Special Summon 1 "Red Nova Dragon" from your GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_ASSAULT_MODE,CARD_RED_NOVA_DRAGON} -s.assault_mode=CARD_RED_NOVA_DRAGON -function s.tempbanishcost(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.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_TUNER) - and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp,chk) - local max_ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_TUNER) - if max_ct==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,max_ct,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end -function s.negbpop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateAttack() then - Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) - end -end -function s.spfilter(c,e,tp) - return c:IsCode(CARD_RED_NOVA_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 \ No newline at end of file diff --git a/pre-release/c101304105.lua b/pre-release/c101304105.lua deleted file mode 100644 index 126c39b0b5..0000000000 --- a/pre-release/c101304105.lua +++ /dev/null @@ -1,83 +0,0 @@ ---紅蓮の王者 ---The Crimson King -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner DARK monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsAttribute,ATTRIBUTE_DARK),1,99) - --Add 1 card that mentions "Red Dragon Archfiend" 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) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Special Summon 1 "Red Dragon Archfiend" from your Extra Deck (this is treated as a Synchro Summon) - 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_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 and re:IsMonsterEffect() end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -function s.thfilter(c) - return c:ListsCode(CARD_RED_DRAGON_ARCHFIEND) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.spfilter(c,e,tp,mc) - if not c:IsCode(CARD_RED_DRAGON_ARCHFIEND) then return false end - local forcedg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,c,nil,REASON_SYNCHRO) - return #forcedg==0 and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) 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 sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if not sc then return end - sc:SetMaterial(nil) - if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) then - sc:CompleteProcedure() - --Its ATK becomes doubled - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(sc:GetAttack()*2) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - --Also it cannot be destroyed by your opponent's card effects - local e2=e1:Clone() - e2:SetDescription(3060) - e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(aux.indoval) - sc:RegisterEffect(e2) - end -end \ No newline at end of file diff --git a/pre-release/c101304106.lua b/pre-release/c101304106.lua deleted file mode 100644 index 01294eea9a..0000000000 --- a/pre-release/c101304106.lua +++ /dev/null @@ -1,70 +0,0 @@ --- クリムゾン・ブレード・ドラゴン ---Crimson Blade Dragon -local s,id=GetID() -local CARD_CRIMSON_BLADER=80321197 -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 "Resonator" Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_RESONATOR),1,1,Synchro.NonTuner(nil),1,99) - --Take 1 Level 8 or higher monster from your Deck or GY that cannot be Normal Summoned/Set, and either Special Summon it (but negate its effects) or add it to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+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:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.thsptg) - e1:SetOperation(s.thspop) - c:RegisterEffect(e1) - --Destroy that monster - 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:SetCode(EVENT_BATTLE_START) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_CRIMSON_BLADER} -s.listed_series={SET_RESONATOR} -function s.thspfilter(c,e,tp,mmz_chk) - return c:IsLevelAbove(8) and not c:IsSummonableCard() 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 return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,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 - aux.ToHandOrElse(sc,tp, - function() - return mmz_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) - end, - function() - if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - sc:NegateEffects(e:GetHandler()) - end - Duel.SpecialSummonComplete() - end, - aux.Stringid(id,3) - ) -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:IsFaceup() and bc:IsLevelAbove(5) 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/c101304107.lua b/pre-release/c101304107.lua deleted file mode 100644 index 39d7bcedae..0000000000 --- a/pre-release/c101304107.lua +++ /dev/null @@ -1,52 +0,0 @@ ---クリムゾン・ヘルコール ---Crimson Call ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Add 1 Level 4 or lower Fiend monster from your GY to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_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) - --Allow your "/Assault Mode" monster or "Red Dragon Archfiend" to make a second attack in a row - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetRange(LOCATION_GRAVE) - e2:SetCondition(s.atkcon) - e2:SetCost(Cost.SelfBanish) - e2:SetOperation(function() Duel.ChainAttack() end) - c:RegisterEffect(e2) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -s.listed_series={SET_ASSAULT_MODE} -function s.thfilter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsAbleToHand() -end -function s.rdafilter(c) - return (c:IsCode(CARD_RED_DRAGON_ARCHFIEND) or (c:IsSynchroMonster() and c:ListsCode(CARD_RED_DRAGON_ARCHFIEND))) and c:IsFaceup() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local locations=Duel.IsExistingMatchingCard(s.rdafilter,tp,LOCATION_MZONE,0,1,nil) and LOCATION_GRAVE|LOCATION_DECK or LOCATION_GRAVE - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,locations,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,locations) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local locations=Duel.IsExistingMatchingCard(s.rdafilter,tp,LOCATION_MZONE,0,1,nil) and LOCATION_GRAVE|LOCATION_DECK or LOCATION_GRAVE - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,locations,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local ac=Duel.GetAttacker() - return ac:IsControler(tp) and ac:CanChainAttack() and (ac:IsCode(CARD_RED_DRAGON_ARCHFIEND) or ac:IsSetCard(SET_ASSAULT_MODE)) -end diff --git a/pre-release/c101304108.lua b/pre-release/c101304108.lua deleted file mode 100644 index 3f556d23ef..0000000000 --- a/pre-release/c101304108.lua +++ /dev/null @@ -1,95 +0,0 @@ ---覇者の鳴動 ---The Ruler's Rumbling ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Apply these effects, in sequence, based on the number of monsters your opponent Special Summoned this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION+CATEGORY_SET) - 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) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --Keep track of how many monsters each player has Special Summoned in a given turn - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SPSUMMON_SUCCESS) - ge1:SetOperation(s.checkop) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_names={CARD_RED_DRAGON_ARCHFIEND} -function s.checkop(e,tp,eg,ep,ev,re,r,rp) - local g0,g1=eg:Split(Card.IsSummonPlayer,nil,0) - for sc0 in g0:Iter() do - Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) - end - for sc1 in g1:Iter() do - Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) - end -end -function s.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSynchroMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and c:IsFaceup() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetFlagEffect(1-tp,id) - if chk==0 then - local b1=ct>=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) - local b2=ct>=3 - local b3=ct>=5 and Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) - return b1 or b2 or b3 - end - if ct>=1 then - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) - end - if ct>=5 then - Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,POS_FACEDOWN_DEFENSE) - if e:IsHasType(EFFECT_TYPE_ACTIVATE) and ct>=10 then - Duel.SetChainLimit(aux.FALSE) - end -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetFlagEffect(1-tp,id) - local breakeff=false - if ct>=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - breakeff=true - end - if ct>=3 then - if breakeff then Duel.BreakEffect() end - local c=e:GetHandler() - local reset_count=Duel.IsTurnPlayer(tp) and 2 or 1 - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1),RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) - --"Red Dragon Archfiend" in your Monster Zone is unaffected by your opponent's activated effects until the end of your next turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,CARD_RED_DRAGON_ARCHFIEND)) - e1:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() end) - e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) - Duel.RegisterEffect(e1,tp) - breakeff=true - end - if ct>=5 then - if breakeff then Duel.BreakEffect() end - local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil) - if #g>0 then - Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) - end - end -end \ No newline at end of file From 533d17b08a520935649da3d669be4d7cb17c36d0 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 30 Jan 2026 12:55:19 +0200 Subject: [PATCH 2/3] Add files via upload --- archetype_setcode_constants.lua | 4 +- 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/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/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 +++++++++++++ 45 files changed, 3923 insertions(+), 2 deletions(-) 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/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/c101303081.lua create mode 100644 pre-release/c101303082.lua create mode 100644 pre-release/c101303083.lua create mode 100644 pre-release/c101303084.lua create mode 100644 pre-release/c101303085.lua create mode 100644 pre-release/c101303086.lua create mode 100644 pre-release/c101303087.lua create mode 100644 pre-release/c101303088.lua create mode 100644 pre-release/c101303089.lua create mode 100644 pre-release/c101303090.lua create mode 100644 pre-release/c101303091.lua create mode 100644 pre-release/c101303092.lua create mode 100644 pre-release/c101303093.lua create mode 100644 pre-release/c101303094.lua create mode 100644 pre-release/c101303095.lua create mode 100644 pre-release/c101303096.lua diff --git a/archetype_setcode_constants.lua b/archetype_setcode_constants.lua index 649ff42c28..9b98c3163d 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -602,9 +602,9 @@ SET_ENNEACRAFT = 0x1cd SET_KEWL_TUNE = 0x1ce SET_ECCLESIA = 0x1cf SET_END_OF_THE_WORLD = 0x1d1 +SET_FAIRY_TAIL = 0x1d2 --Released but the official English name is unconfirmed SET_ELVENNOTES = 0x1d0 ---Pre-release archetypes -SET_FAIRY_TAIL = 0x1d2 SET_CLOWN_CREW = 0x1d3 +--Pre-release archetypes SET_GMX = 0x1d4 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/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/c101303081.lua b/pre-release/c101303081.lua new file mode 100644 index 0000000000..06f2fdcb3f --- /dev/null +++ b/pre-release/c101303081.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/pre-release/c101303082.lua b/pre-release/c101303082.lua new file mode 100644 index 0000000000..92116798d7 --- /dev/null +++ b/pre-release/c101303082.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/pre-release/c101303083.lua b/pre-release/c101303083.lua new file mode 100644 index 0000000000..af00f80076 --- /dev/null +++ b/pre-release/c101303083.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/c101303084.lua b/pre-release/c101303084.lua new file mode 100644 index 0000000000..9d8a46a53d --- /dev/null +++ b/pre-release/c101303084.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/pre-release/c101303085.lua b/pre-release/c101303085.lua new file mode 100644 index 0000000000..60788b2ca3 --- /dev/null +++ b/pre-release/c101303085.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/pre-release/c101303086.lua b/pre-release/c101303086.lua new file mode 100644 index 0000000000..682deca7c9 --- /dev/null +++ b/pre-release/c101303086.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/pre-release/c101303087.lua b/pre-release/c101303087.lua new file mode 100644 index 0000000000..4908ffe477 --- /dev/null +++ b/pre-release/c101303087.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/pre-release/c101303088.lua b/pre-release/c101303088.lua new file mode 100644 index 0000000000..8758712866 --- /dev/null +++ b/pre-release/c101303088.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/pre-release/c101303089.lua b/pre-release/c101303089.lua new file mode 100644 index 0000000000..f81c0f5520 --- /dev/null +++ b/pre-release/c101303089.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/pre-release/c101303090.lua b/pre-release/c101303090.lua new file mode 100644 index 0000000000..d693e1b437 --- /dev/null +++ b/pre-release/c101303090.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/pre-release/c101303091.lua b/pre-release/c101303091.lua new file mode 100644 index 0000000000..0c926a3c5f --- /dev/null +++ b/pre-release/c101303091.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={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 new file mode 100644 index 0000000000..5d51e57786 --- /dev/null +++ b/pre-release/c101303092.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/pre-release/c101303093.lua b/pre-release/c101303093.lua new file mode 100644 index 0000000000..63cc1d0705 --- /dev/null +++ b/pre-release/c101303093.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/pre-release/c101303094.lua b/pre-release/c101303094.lua new file mode 100644 index 0000000000..e0149017d6 --- /dev/null +++ b/pre-release/c101303094.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/pre-release/c101303095.lua b/pre-release/c101303095.lua new file mode 100644 index 0000000000..167a0d475e --- /dev/null +++ b/pre-release/c101303095.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/pre-release/c101303096.lua b/pre-release/c101303096.lua new file mode 100644 index 0000000000..8ae2b45050 --- /dev/null +++ b/pre-release/c101303096.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 From 8a9d7a3563d906a7e3b39b369aff3ecb86b7d8ee Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 30 Jan 2026 12:56:31 +0200 Subject: [PATCH 3/3] Add files via upload --- official/c10266279.lua | 134 ++++++++++++++++++++++++++++++ official/c17209452.lua | 102 +++++++++++++++++++++++ official/c17269895.lua | 95 +++++++++++++++++++++ official/c17473466.lua | 110 ++++++++++++++++++++++++ official/c18321034.lua | 65 +++++++++++++++ official/c18482473.lua | 99 ++++++++++++++++++++++ official/c18595008.lua | 97 ++++++++++++++++++++++ official/c18711696.lua | 92 +++++++++++++++++++++ official/c19144622.lua | 107 ++++++++++++++++++++++++ official/c19326613.lua | 93 +++++++++++++++++++++ official/c19434243.lua | 97 ++++++++++++++++++++++ official/c19504025.lua | 91 ++++++++++++++++++++ official/c20448151.lua | 55 ++++++++++++ official/c25661743.lua | 82 ++++++++++++++++++ official/c26387390.lua | 88 ++++++++++++++++++++ official/c27519978.lua | 69 ++++++++++++++++ official/c27632520.lua | 83 +++++++++++++++++++ official/c30698243.lua | 96 +++++++++++++++++++++ official/c31411835.lua | 54 ++++++++++++ official/c31533473.lua | 71 ++++++++++++++++ official/c3294539.lua | 70 ++++++++++++++++ official/c38354018.lua | 72 ++++++++++++++++ official/c39576656.lua | 110 ++++++++++++++++++++++++ official/c4026187.lua | 92 +++++++++++++++++++++ official/c42719764.lua | 52 ++++++++++++ official/c42759961.lua | 84 +++++++++++++++++++ official/c43471513.lua | 79 ++++++++++++++++++ official/c43871165.lua | 143 ++++++++++++++++++++++++++++++++ official/c43932352.lua | 70 ++++++++++++++++ official/c44654994.lua | 58 +++++++++++++ official/c44694191.lua | 90 ++++++++++++++++++++ official/c44716748.lua | 160 +++++++++++++++++++++++++++++++++++ official/c44886582.lua | 71 ++++++++++++++++ official/c44994712.lua | 99 ++++++++++++++++++++++ official/c45116390.lua | 88 ++++++++++++++++++++ official/c45508030.lua | 71 ++++++++++++++++ official/c45538320.lua | 107 ++++++++++++++++++++++++ official/c5148778.lua | 118 ++++++++++++++++++++++++++ official/c51669847.lua | 81 ++++++++++++++++++ official/c5208118.lua | 75 +++++++++++++++++ official/c52782439.lua | 79 ++++++++++++++++++ official/c53904087.lua | 88 ++++++++++++++++++++ official/c56651978.lua | 97 ++++++++++++++++++++++ official/c56725612.lua | 80 ++++++++++++++++++ official/c56838842.lua | 93 +++++++++++++++++++++ official/c57847269.lua | 106 ++++++++++++++++++++++++ official/c6083904.lua | 89 ++++++++++++++++++++ official/c6325660.lua | 68 +++++++++++++++ official/c6361316.lua | 89 ++++++++++++++++++++ official/c64626565.lua | 71 ++++++++++++++++ official/c6547248.lua | 111 +++++++++++++++++++++++++ official/c65848113.lua | 83 +++++++++++++++++++ official/c65961304.lua | 86 +++++++++++++++++++ official/c66787942.lua | 67 +++++++++++++++ official/c67809530.lua | 83 +++++++++++++++++++ official/c70058649.lua | 153 ++++++++++++++++++++++++++++++++++ official/c70088809.lua | 106 ++++++++++++++++++++++++ official/c70488851.lua | 164 ++++++++++++++++++++++++++++++++++++ official/c71275181.lua | 72 ++++++++++++++++ official/c71801447.lua | 184 +++++++++++++++++++++++++++++++++++++++++ official/c78021082.lua | 95 +++++++++++++++++++++ official/c78114463.lua | 98 ++++++++++++++++++++++ official/c78744660.lua | 79 ++++++++++++++++++ official/c79936051.lua | 78 +++++++++++++++++ official/c79966218.lua | 100 ++++++++++++++++++++++ official/c81101309.lua | 78 +++++++++++++++++ official/c82119326.lua | 66 +++++++++++++++ official/c82159583.lua | 86 +++++++++++++++++++ official/c82323997.lua | 86 +++++++++++++++++++ official/c82933935.lua | 91 ++++++++++++++++++++ official/c82997779.lua | 71 ++++++++++++++++ official/c83232904.lua | 121 +++++++++++++++++++++++++++ official/c83445539.lua | 103 +++++++++++++++++++++++ official/c84054556.lua | 79 ++++++++++++++++++ official/c89176044.lua | 86 +++++++++++++++++++ official/c90011273.lua | 89 ++++++++++++++++++++ official/c91237821.lua | 67 +++++++++++++++ official/c92359409.lua | 88 ++++++++++++++++++++ official/c93172951.lua | 79 ++++++++++++++++++ official/c99398682.lua | 52 ++++++++++++ 80 files changed, 7231 insertions(+) create mode 100644 official/c10266279.lua create mode 100644 official/c17209452.lua create mode 100644 official/c17269895.lua create mode 100644 official/c17473466.lua create mode 100644 official/c18321034.lua create mode 100644 official/c18482473.lua create mode 100644 official/c18595008.lua create mode 100644 official/c18711696.lua create mode 100644 official/c19144622.lua create mode 100644 official/c19326613.lua create mode 100644 official/c19434243.lua create mode 100644 official/c19504025.lua create mode 100644 official/c20448151.lua create mode 100644 official/c25661743.lua create mode 100644 official/c26387390.lua create mode 100644 official/c27519978.lua create mode 100644 official/c27632520.lua create mode 100644 official/c30698243.lua create mode 100644 official/c31411835.lua create mode 100644 official/c31533473.lua create mode 100644 official/c3294539.lua create mode 100644 official/c38354018.lua create mode 100644 official/c39576656.lua create mode 100644 official/c4026187.lua create mode 100644 official/c42719764.lua create mode 100644 official/c42759961.lua create mode 100644 official/c43471513.lua create mode 100644 official/c43871165.lua create mode 100644 official/c43932352.lua create mode 100644 official/c44654994.lua create mode 100644 official/c44694191.lua create mode 100644 official/c44716748.lua create mode 100644 official/c44886582.lua create mode 100644 official/c44994712.lua create mode 100644 official/c45116390.lua create mode 100644 official/c45508030.lua create mode 100644 official/c45538320.lua create mode 100644 official/c5148778.lua create mode 100644 official/c51669847.lua create mode 100644 official/c5208118.lua create mode 100644 official/c52782439.lua create mode 100644 official/c53904087.lua create mode 100644 official/c56651978.lua create mode 100644 official/c56725612.lua create mode 100644 official/c56838842.lua create mode 100644 official/c57847269.lua create mode 100644 official/c6083904.lua create mode 100644 official/c6325660.lua create mode 100644 official/c6361316.lua create mode 100644 official/c64626565.lua create mode 100644 official/c6547248.lua create mode 100644 official/c65848113.lua create mode 100644 official/c65961304.lua create mode 100644 official/c66787942.lua create mode 100644 official/c67809530.lua create mode 100644 official/c70058649.lua create mode 100644 official/c70088809.lua create mode 100644 official/c70488851.lua create mode 100644 official/c71275181.lua create mode 100644 official/c71801447.lua create mode 100644 official/c78021082.lua create mode 100644 official/c78114463.lua create mode 100644 official/c78744660.lua create mode 100644 official/c79936051.lua create mode 100644 official/c79966218.lua create mode 100644 official/c81101309.lua create mode 100644 official/c82119326.lua create mode 100644 official/c82159583.lua create mode 100644 official/c82323997.lua create mode 100644 official/c82933935.lua create mode 100644 official/c82997779.lua create mode 100644 official/c83232904.lua create mode 100644 official/c83445539.lua create mode 100644 official/c84054556.lua create mode 100644 official/c89176044.lua create mode 100644 official/c90011273.lua create mode 100644 official/c91237821.lua create mode 100644 official/c92359409.lua create mode 100644 official/c93172951.lua create mode 100644 official/c99398682.lua diff --git a/official/c10266279.lua b/official/c10266279.lua new file mode 100644 index 0000000000..9265026f49 --- /dev/null +++ b/official/c10266279.lua @@ -0,0 +1,134 @@ +--獄神影精-ジュノルド +--Power Patron Shadow Spirit Junordo +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --If a "Power Patron" and/or "Elvennotes" monster(s) is Special Summoned to your field while this card is in the Pendulum Zone: You can destroy this card, and if you do, draw 2 cards, then discard 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.pdescon) + e1:SetTarget(s.pdestg) + e1:SetOperation(s.pdesop) + c:RegisterEffect(e1) + --You can banish (face-down) the top 3 cards of your Deck; destroy this card, and if you do, Special Summon 1 "Junora the Power Patron of Tuning" from your Extra Deck (this is treated as a Synchro Summon) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.mdescost) + e2:SetTarget(s.mdestg) + e2:SetOperation(s.mdesop) + c:RegisterEffect(e2) + --If this card is added to your Extra Deck face-up: You can add 1 "Power Patron" or "Elvennotes" card from your face-up Extra Deck or GY to your hand, except "Power Patron Shadow Spirit Junordo" + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_DECK) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.thcon) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_names={id,5914858} --"Junora the Power Patron of Tuning" +s.listed_series={SET_POWER_PATRON,SET_ELVENNOTES} +function s.pdesconfilter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard({SET_POWER_PATRON,SET_ELVENNOTES}) +end +function s.pdescon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.pdesconfilter,1,nil,tp) +end +function s.pdestg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +end +function s.pdesop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and Duel.Draw(tp,2,REASON_EFFECT)==2 then + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) + end +end +function s.junoraspfilter(c,e,tp,hc) + return c:IsCode(5914858) and Duel.GetLocationCountFromEx(tp,tp,hc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) +end +function s.mdescost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetDecktopGroup(tp,3) + if chk==0 then return g:IsExists(Card.IsAbleToRemoveAsCost,3,nil,POS_FACEDOWN) end + Duel.DisableShuffleCheck() + Duel.Remove(g,POS_FACEDOWN,REASON_COST) +end +function s.mdestg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.junoraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.mdesop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.junoraspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if not sc then return end + sc:SetMaterial(nil) + if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + end +end +function s.spfilter(c,e,tp) + if not c:IsSetCard({SET_POWER_PATRON,SET_ARTMAGE}) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end + if c:IsLocation(LOCATION_DECK) then + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + else + return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)==0 + end +end +function s.spcon(e) + local c=e:GetHandler() + return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thcon(e) + local c=e:GetHandler() + return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() +end +function s.thfilter(c) + return c:IsFaceup() and c:IsSetCard({SET_POWER_PATRON,SET_ELVENNOTES}) and c:IsAbleToHand() and not c:IsCode(id) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c17209452.lua b/official/c17209452.lua new file mode 100644 index 0000000000..bfb2efcfee --- /dev/null +++ b/official/c17209452.lua @@ -0,0 +1,102 @@ +--キラーチューン・ロタリー +--Kewl Tune Rotary +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If this card on the field would be used as Synchro Material, 1 Tuner in your hand can be used as 1 of the other materials + Synchro.AddHandMaterialEffect(c,id,function(c) return c:IsType(TYPE_TUNER) end) + --You can reveal this card and 1 other Tuner in your hand; immediately after this effect resolves, Normal Summon 1 Tuner + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(s.nscost) + e1:SetTarget(s.nstg) + e1:SetOperation(s.nsop) + c:RegisterEffect(e1) + --If this card is sent to the GY as Synchro Material: You can activate 1 of these effects; + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_BE_MATERIAL) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_KEWL_TUNE} +function s.nscostfilter(c) + return c:IsType(TYPE_TUNER) and not c:IsPublic() +end +function s.nscost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsPublic() and Duel.IsExistingMatchingCard(s.nscostfilter,tp,LOCATION_HAND,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.nscostfilter,tp,LOCATION_HAND,0,1,1,c):GetFirst() + Duel.ConfirmCards(1-tp,Group.FromCards(c,rc)) + Duel.ShuffleHand(tp) +end +function s.nsfilter(c) + return c:IsType(TYPE_TUNER) and c:IsSummonable(true,nil) +end +function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) +end +function s.nsop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() + if sc then + Duel.Summon(tp,sc,true,nil) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) + local b2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_TODECK) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_GRAVE) + elseif op==2 then + e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_KEWL_TUNE) and c:IsSpellTrap() and c:IsAbleToHand() +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Place 1 card from your opponent's GY on the bottom of the Deck + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) + end + elseif op==2 then + --● Look at your opponent's hand, then you can add 1 "Kewl Tune" Spell/Trap from your Deck to your hand + local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) + if #g==0 then return end + Duel.ConfirmCards(tp,g) + Duel.ShuffleHand(1-tp) + local hg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if #hg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,4)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local hsg=hg:Select(tp,1,1,nil) + if #hsg>0 then + Duel.BreakEffect() + Duel.SendtoHand(hsg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,hsg) + end + end +end \ No newline at end of file diff --git a/official/c17269895.lua b/official/c17269895.lua new file mode 100644 index 0000000000..3f556d23ef --- /dev/null +++ b/official/c17269895.lua @@ -0,0 +1,95 @@ +--覇者の鳴動 +--The Ruler's Rumbling +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Apply these effects, in sequence, based on the number of monsters your opponent Special Summoned this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION+CATEGORY_SET) + 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) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --Keep track of how many monsters each player has Special Summoned in a given turn + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_SPSUMMON_SUCCESS) + ge1:SetOperation(s.checkop) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + local g0,g1=eg:Split(Card.IsSummonPlayer,nil,0) + for sc0 in g0:Iter() do + Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) + end + for sc1 in g1:Iter() do + Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) + end +end +function s.spfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSynchroMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and c:IsFaceup() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local ct=Duel.GetFlagEffect(1-tp,id) + if chk==0 then + local b1=ct>=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) + local b2=ct>=3 + local b3=ct>=5 and Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) + return b1 or b2 or b3 + end + if ct>=1 then + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) + end + if ct>=5 then + Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,POS_FACEDOWN_DEFENSE) + if e:IsHasType(EFFECT_TYPE_ACTIVATE) and ct>=10 then + Duel.SetChainLimit(aux.FALSE) + end +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local ct=Duel.GetFlagEffect(1-tp,id) + local breakeff=false + if ct>=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + breakeff=true + end + if ct>=3 then + if breakeff then Duel.BreakEffect() end + local c=e:GetHandler() + local reset_count=Duel.IsTurnPlayer(tp) and 2 or 1 + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1),RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) + --"Red Dragon Archfiend" in your Monster Zone is unaffected by your opponent's activated effects until the end of your next turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_IMMUNE_EFFECT) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,CARD_RED_DRAGON_ARCHFIEND)) + e1:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() end) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) + Duel.RegisterEffect(e1,tp) + breakeff=true + end + if ct>=5 then + if breakeff then Duel.BreakEffect() end + local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil) + if #g>0 then + Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) + end + end +end \ No newline at end of file diff --git a/official/c17473466.lua b/official/c17473466.lua new file mode 100644 index 0000000000..ac59b413fe --- /dev/null +++ b/official/c17473466.lua @@ -0,0 +1,110 @@ +--獄神影獣-ネルヴェド +--Power Patron Shadow Beast Nervedo +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --When a monster effect activated by your opponent in response to the activation of your "Power Patron" or "Artmage" monster's effect resolves, 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 banish (face-down) the top 3 cards of your Deck; destroy this card, and if you do, Special Summon 1 "Nerva the Power Patron of Creation" from your Extra Deck (this is treated as a Fusion Summon) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(s.descost) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) + --If this card is added to your Extra Deck face-up: You can Special Summon 1 "Power Patron" or "Artmage" monster from your Deck or face-up Extra Deck, except "Power Patron Shadow Beast Nervedo" + 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_DECK) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.spcon) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_names={id,53589300} --"Nerva the Power Patron of Creation" +s.listed_series={SET_POWER_PATRON,SET_ARTMAGE} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local ch=Duel.GetCurrentChain()-1 + if not (ch>0 and ep==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) and not Duel.HasFlagEffect(tp,id)) then return false end + local ctrl,setcodes,trig_eff=Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_SETCODES,CHAININFO_TRIGGERING_EFFECT) + if ctrl~=tp or not trig_eff:IsMonsterEffect() then return false end + for _,set in ipairs(setcodes) do + if (SET_POWER_PATRON&0xfff)==(set&0xfff) and (SET_POWER_PATRON&set)==SET_POWER_PATRON then return true end + if (SET_ARTMAGE&0xfff)==(set&0xfff) and (SET_ARTMAGE&set)==SET_ARTMAGE then return true end + end +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,2)) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.Hint(HINT_CARD,0,id) + if Duel.NegateEffect(ev) then + Duel.BreakEffect() + Duel.Destroy(c,REASON_EFFECT) + end +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetDecktopGroup(tp,3) + if chk==0 then return g:IsExists(Card.IsAbleToRemoveAsCost,3,nil,POS_FACEDOWN) end + Duel.DisableShuffleCheck() + Duel.Remove(g,POS_FACEDOWN,REASON_COST) +end +function s.nervaspfilter(c,e,tp,hc) + return c:IsCode(53589300) and Duel.GetLocationCountFromEx(tp,tp,hc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.nervaspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.nervaspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if not sc then return end + sc:SetMaterial(nil) + if Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + end +end +function s.spcon(e) + local c=e:GetHandler() + return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() +end +function s.spfilter(c,e,tp) + if not c:IsSetCard({SET_POWER_PATRON,SET_ARTMAGE}) or c:IsCode(id) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end + if c:IsLocation(LOCATION_DECK) then + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + else + return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c18321034.lua b/official/c18321034.lua new file mode 100644 index 0000000000..9d88d0014c --- /dev/null +++ b/official/c18321034.lua @@ -0,0 +1,65 @@ +--見えざる手マキブエル +--Hecahands Makibel +local s,id=GetID() +function s.initial_effect(c) + --If this card battles a monster, neither can be destroyed by that battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(s.indestg) + e1:SetValue(1) + c:RegisterEffect(e1) + --You can reveal this card in your hand; Fusion Summon 1 "Hecahands" Fusion Monster from your Extra Deck, using monsters from your hand or field, including this card in the hand + local fusion_params={ + handler=c, + fusfilter=function(c) return c:IsSetCard(SET_HECAHANDS) end, + gc=Fusion.ForcedHandler + } + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(Cost.SelfReveal) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2) + --If an Illusion Fusion Monster(s) is sent to your GY while this card is in your GY: You can add this card to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.thcon) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_series={SET_HECAHANDS} +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.thconfilter(c,tp) + return c:IsRace(RACE_ILLUSION) and c:IsFusionMonster() and c:IsControler(tp) +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.thconfilter,1,nil,tp) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c18482473.lua b/official/c18482473.lua new file mode 100644 index 0000000000..02b9179806 --- /dev/null +++ b/official/c18482473.lua @@ -0,0 +1,99 @@ +--H・E・R・O フラッシュ! +--H-E-R-O Flash! +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_series={SET_ELEMENTAL_HERO} +function s.thspfilter(c,e,tp,mmz_chk) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and (c:IsAbleToHand() + or (mmz_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + local max_count=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_ELEMENTAL_HERO),tp,LOCATION_MZONE,0,nil) + local b1=not Duel.HasFlagEffect(tp,id) + local b2=max_count>0 and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) + local b3=Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,mmz_chk) + local b4=not Duel.HasFlagEffect(tp,id+100) + if chk==0 then return b1 or b2 or b3 or b4 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)}, + {b4,aux.Stringid(id,4)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(0) + e:SetProperty(0) + elseif op==2 then + e:SetCategory(CATEGORY_DESTROY) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,max_count,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + elseif op==3 then + e:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) + e:SetProperty(0) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) + elseif op==4 then + e:SetCategory(0) + e:SetProperty(0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + local c=e:GetHandler() + if op==1 then + --● If your "Elemental HERO" monster attacks a Defense Position monster this turn, inflict piercing battle damage to your opponent + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,5)) + --Your "Elemental HERO" monsters inflict piercing battle damage + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_PIERCE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_ELEMENTAL_HERO) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + elseif op==2 then + --● Target cards your opponent controls up to the number of "Elemental HERO" monsters you control; destroy them + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) + end + elseif op==3 then + --● Add to your hand, or Special Summon, 1 "Elemental HERO" monster from your GY + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,6)) + local sc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mmz_chk):GetFirst() + if not sc then return end + 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,7) + ) + elseif op==4 then + --● "Elemental HERO" monsters can attack directly this turn + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,8)) + --"Elemental HERO" monsters can attack directly this turn + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_DIRECT_ATTACK) + e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e2:SetTarget(function(e,c) return c:IsSetCard(SET_ELEMENTAL_HERO) end) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) + end +end \ No newline at end of file diff --git a/official/c18595008.lua b/official/c18595008.lua new file mode 100644 index 0000000000..c1dea0bda5 --- /dev/null +++ b/official/c18595008.lua @@ -0,0 +1,97 @@ +--捕食植物テッポウリザード +--Predaplant Lilizard +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --1 face-up monster becomes DARK until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.attg) + e2:SetOperation(s.atop) + c:RegisterEffect(e2) + --Draw 1 card if this card is Special Summoned from the GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_DRAW) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_GRAVE) end) + e3:SetTarget(s.drtg) + e3:SetOperation(s.drop) + c:RegisterEffect(e3) +end +s.listed_series={SET_PREDAPLANT,SET_STARVING_VENOM} +s.listed_names={CARD_POLYMERIZATION} +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,{SET_PREDAPLANT,SET_STARVING_VENOM}),tp,LOCATION_MZONE,0,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,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thfilter(c) + return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() +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 g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sg=g:Select(tp,1,1,nil) + if #sg==0 then return end + Duel.BreakEffect() + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end + end +end +function s.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttributeExcept(ATTRIBUTE_DARK) end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAttributeExcept,ATTRIBUTE_DARK),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAttributeExcept,ATTRIBUTE_DARK),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) +end +function s.atop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsFaceup() and tc:IsRelateToEffect(e) then + --It becomes DARK until the end of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e1:SetValue(ATTRIBUTE_DARK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Draw(p,d,REASON_EFFECT) +end diff --git a/official/c18711696.lua b/official/c18711696.lua new file mode 100644 index 0000000000..ba8c58e3b7 --- /dev/null +++ b/official/c18711696.lua @@ -0,0 +1,92 @@ +--バスターソニック・ウォリアー +--Assault Sonic Warrior +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If you control "Junk Warrior", "Assault Mode Activate", or a card that mentions either of them: You can Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If this card is Normal or Special Summoned: You can add 1 "Synchron" monster or "Assault Mode Activate" from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --If this card is sent to the GY as Synchro Material: You can activate this effect; this turn, monsters you control gain 500 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_BE_MATERIAL) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end) + e3:SetOperation(s.atkop) + c:RegisterEffect(e3) +end +s.listed_series={SET_SYNCHRON} +s.listed_names={CARD_JUNK_WARRIOR,CARD_ASSAULT_MODE} +function s.spconfilter(c) + return (c:IsCode(CARD_JUNK_WARRIOR,CARD_ASSAULT_MODE) or c:ListsCode(CARD_JUNK_WARRIOR,CARD_ASSAULT_MODE)) and c:IsFaceup() +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_ONFIELD,0,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,LOCATION_HAND) +end +function s.thfilter(c) + return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return ((c:IsSetCard(SET_SYNCHRON) and c:IsMonster()) or c:IsCode(CARD_ASSAULT_MODE)) 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.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) + --This turn, monsters you control gain 500 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetValue(500) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c19144622.lua b/official/c19144622.lua new file mode 100644 index 0000000000..212144217c --- /dev/null +++ b/official/c19144622.lua @@ -0,0 +1,107 @@ +--妖精伝姫-マチリル +--Fairy Tail - Matchlille +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand or GY, also you cannot Special Summon for the rest of this turn, except Spellcaster 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|LOCATION_GRAVE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Fairy Tail" Spell/Trap from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --Make the name of 1 Effect Monster your opponent controls become "Fairy Prince" + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,2}) + e3:SetCost(Cost.PayLP(500)) + e3:SetTarget(s.namechangetg) + e3:SetOperation(s.namechangeop) + c:RegisterEffect(e3) +end +s.listed_series={SET_FAIRY_TAIL} +s.listed_names={91957038,CARD_FAIRY_PRINCE} --"Fairy Tail Tales" +function s.spconfilter(c) + return c:IsRace(RACE_SPELLCASTER) and c:IsBaseAttack(1850) and c:IsFaceup() +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,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 + --You cannot Special Summon for the rest of this turn, except Spellcaster monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_SPELLCASTER) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thfilter(c) + return ((c:IsSetCard(SET_FAIRY_TAIL) and c:IsSpellTrap()) or c:IsCode(91957038)) 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.namechangefilter(c) + return c:IsType(TYPE_EFFECT) and c:IsFaceup() and not c:IsCode(CARD_FAIRY_PRINCE) +end +function s.namechangetg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.namechangefilter,tp,0,LOCATION_MZONE,1,nil) end +end +function s.namechangeop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + local sc=Duel.SelectMatchingCard(tp,s.namechangefilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + if sc then + Duel.HintSelection(sc) + --Its name becomes "Fairy Prince" + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(CARD_FAIRY_PRINCE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c19326613.lua b/official/c19326613.lua new file mode 100644 index 0000000000..977fb1c568 --- /dev/null +++ b/official/c19326613.lua @@ -0,0 +1,93 @@ +--妖精伝姫のはじまりはじまり +--Fairy Tail Long Long Ago +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon up to 1 LIGHT "Fairy Tail" monster each from your hand, GY, and banishment, with different names, also you cannot Special Summon for the rest of this turn, except Spellcaster monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --Set this card, but it cannot be activated unless you control a "Fairy Tail" monster + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_SET) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_REMOVE) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.settg) + e2a:SetOperation(s.setop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_TO_GRAVE) + e2b:SetCondition(function(e) return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + c:RegisterEffect(e2b) +end +s.listed_series={SET_FAIRY_TAIL} +function s.spfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(SET_FAIRY_TAIL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) +end +function s.spcheck(sg,e,tp,mg) + local ct1=sg:GetClassCount(Card.GetCode) + local ct2=sg:GetClassCount(Card.GetLocation) + local ct3=#sg + return ct1==ct3 and ct2==ct3,ct1~=ct3 or ct2~=ct3 +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|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft>0 then + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp) + if #g>0 then + ft=math.min(ft,3) + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.spcheck,1,tp,HINTMSG_SPSUMMON) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end + end + --You cannot Special Summon for the rest of this turn, except Spellcaster monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_SPELLCASTER) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SSet(tp,c)>0 then + --It cannot be activated unless you control a "Fairy Tail" monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetCondition(function() return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,0,1,nil) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c19434243.lua b/official/c19434243.lua new file mode 100644 index 0000000000..85f371a4e2 --- /dev/null +++ b/official/c19434243.lua @@ -0,0 +1,97 @@ +--パワー・バイス・ドラゴン +--Power Vice Dragon +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --A "Red Dragon Archfiend" that was Synchro Summoned using this card as material cannot be destroyed by battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EVENT_BE_MATERIAL) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsCode(CARD_RED_DRAGON_ARCHFIEND) end) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Special Summon this card from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Resonator" monster 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.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +s.listed_series={SET_RESONATOR} +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local rc=c:GetReasonCard() + --Cannot be destroyed by battle + local e1=Effect.CreateEffect(c) + e1:SetDescription(3000) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + rc:RegisterEffect(e1) +end +function s.spconfilter(c) + return not (c:IsAttribute(ATTRIBUTE_DARK) and c:IsSynchroMonster() and c:IsFaceup()) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return not Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,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:IsSetCard(SET_RESONATOR) 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 + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except DARK 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:IsAttribute(ATTRIBUTE_DARK) and 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:IsOriginalAttribute(ATTRIBUTE_DARK) and c:IsOriginalType(TYPE_SYNCHRO)) end) +end \ No newline at end of file diff --git a/official/c19504025.lua b/official/c19504025.lua new file mode 100644 index 0000000000..b4fc8266d2 --- /dev/null +++ b/official/c19504025.lua @@ -0,0 +1,91 @@ +--糾罪巧-再巧 +--Enneacraft Reset +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Place 1 "Enneapolis" from your Deck or GY face-up in your Field Zone, or if you control "Enneapolis", you can negate the effects of face-up cards your opponent controls up to the number of cards in your Pendulum Zones instead + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE) + 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) + --If your opponent activates a card or effect while this card is in your GY: You can banish this card; change "Enneacraft" monsters you control to face-down Defense Position up to the number of cards in your Pendulum Zones + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_POSITION+CATEGORY_SET) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_GRAVE) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.postg) + e2:SetOperation(s.posop) + c:RegisterEffect(e2) +end +s.listed_names={17621695} --"Enneapolis" +s.listed_series={SET_ENNEACRAFT} +function s.plfilter(c) + return c:IsCode(17621695) and not c:IsForbidden() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local disable_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,17621695),tp,LOCATION_ONFIELD,0,1,nil) + and Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)>0 + and Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) + return disable_chk or Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_ONFIELD) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local place_chk=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.plfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) + local pzone_card_count=Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0) + local disable_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,17621695),tp,LOCATION_ONFIELD,0,1,nil) + and pzone_card_count>0 + and Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) + local op=1 + if disable_chk then + op=Duel.SelectEffect(tp, + {place_chk,aux.Stringid(id,2)}, + {disable_chk,aux.Stringid(id,3)}) + end + if op==1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.plfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() + if sc then + Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) + end + elseif op==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectMatchingCard(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,pzone_card_count,nil) + if #g==0 then return end + Duel.HintSelection(g) + local c=e:GetHandler() + for sc in g:Iter() do + --Negate their effects + sc:NegateEffects(c,nil,true) + end + end +end +function s.posfilter(c) + return c:IsSetCard(SET_ENNEACRAFT) and c:IsCanTurnSet() +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)>0 + and Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,POS_FACEDOWN_DEFENSE) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local max_count=Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0) + if max_count==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,0,1,max_count,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) + end +end \ No newline at end of file diff --git a/official/c20448151.lua b/official/c20448151.lua new file mode 100644 index 0000000000..7430b86365 --- /dev/null +++ b/official/c20448151.lua @@ -0,0 +1,55 @@ +--道化の一座『下稽古』 +--Clown Crew "Rehearsal" +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Tribute 1 monster from your hand or field; add 1 "Clown Crew Biancaviso" and 1 "Clown Crew" Spell/Trap from your Deck to your hand, except "Clown Crew "Rehearsal"" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(s.thcost) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --You can banish this card from your GY; Ritual Summon 1 "Clown Crew" Ritual Monster from your hand, by Tributing monsters from your hand or field whose total Levels equal or exceed its Level + local e2=Ritual.CreateProc(c,RITPROC_GREATER, + function(c) return c:IsSetCard(SET_CLOWN_CREW) end, + nil,aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + c:RegisterEffect(e2) +end +s.listed_series={SET_CLOWN_CREW} +s.listed_names={82159583,id} --"Clown Crew Biancaviso" +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,nil,1,true,nil,nil) end + local g=Duel.SelectReleaseGroupCost(tp,nil,1,1,true,nil,nil) + Duel.Release(g,REASON_COST) +end +function s.thfilter(c) + return (c:IsCode(82159583) or (c:IsSetCard(SET_CLOWN_CREW) and c:IsSpellTrap() and not c:IsCode(id))) and c:IsAbleToHand() +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsCode,1,nil,82159583) and sg:IsExists(Card.IsSpellTrap,1,nil) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if #g<2 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_ATOHAND) + if #sg==2 then + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end +end \ No newline at end of file diff --git a/official/c25661743.lua b/official/c25661743.lua new file mode 100644 index 0000000000..c2b5e553ad --- /dev/null +++ b/official/c25661743.lua @@ -0,0 +1,82 @@ +--絶解なる獄神門-テルミナス +--Unleashed Power Patron Portal - Terminus +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Send 1 "Power Patron" monster from your Deck or Extra Deck to the GY, then you can add 1 DARK Fairy monster from your Deck to your hand, also you cannot declare attacks for the rest of this turn, except with "Power Patron" monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --At the start of the Damage Step, if your "Power Patron" monster battles an opponent's monster: You can banish this card from your GY; banish (face-down) that opponent's monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_START) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.bancon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.bantg) + e2:SetOperation(s.banop) + c:RegisterEffect(e2) +end +s.listed_series={SET_POWER_PATRON} +function s.tgfilter(c) + return c:IsSetCard(SET_POWER_PATRON) and c:IsMonster() and c:IsAbleToGrave() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thfilter(c) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FAIRY) and c:IsAbleToHand() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil):GetFirst() + if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #sg>0 then + Duel.BreakEffect() + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end + end + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) + --You cannot declare attacks for the rest of this turn, except with "Power Patron" monsters + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_POWER_PATRON) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.bancon(e,tp,eg,ep,ev,re,r,rp) + local a,b=Duel.GetBattleMonster(tp) + return a and b and a:IsSetCard(SET_POWER_PATRON) and a:IsFaceup() and b:IsAbleToRemove(nil,POS_FACEDOWN) +end +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local _,b=Duel.GetBattleMonster(tp) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,b,1,tp,0) +end +function s.banop(e,tp,eg,ep,ev,re,r,rp) + local _,b=Duel.GetBattleMonster(tp) + if b and b:IsRelateToBattle() and b:IsControler(1-tp) then + Duel.Remove(b,POS_FACEDOWN,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c26387390.lua b/official/c26387390.lua new file mode 100644 index 0000000000..c9b2b3f27d --- /dev/null +++ b/official/c26387390.lua @@ -0,0 +1,88 @@ +--ジャンク・シグナル +--Junk Signal +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_names={CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON} +function s.spcostfilter(c,e,tp) + return Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) +end +function s.spfilter(c,e,tp) + return (c:IsCode(CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON) or c:ListsCode(CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON)) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,e,tp) + local ex,_,event_player,event_value,event_reff=Duel.CheckEvent(EVENT_CHAINING,true) + local trig_player,trig_type=nil + if ex then + trig_player,trig_type=Duel.GetChainInfo(event_value-1,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_TYPE) + end + local b2=ex and event_player==1-tp and Duel.IsChainDisablable(event_value) and trig_player==tp and trig_type&TYPE_SYNCHRO>0 + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + local sc=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,e,tp):GetFirst() + Duel.Release(sc,REASON_COST) + e:SetLabelObject(sc) + sc:CreateEffectRelation(e) + elseif op==2 then + e:SetLabel(op,event_value) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local op=e:GetLabel() + if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) + elseif op==2 then + e:SetCategory(CATEGORY_DISABLE) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op,event_value=e:GetLabel() + if op==1 then + --Tribute 1 monster; Special Summon 1 "Junk Warrior", 1 "Stardust Dragon", or 1 monster that mentions either of them from your hand, Deck, or GY, except the Tributed monster + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local sc=e:GetLabelObject() + local exc=sc:IsRelateToEffect(e) and sc or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,exc,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + --When your opponent activates a card or effect in response to the activation of your Synchro Monster's effect: Negate that opponent's effect + Duel.NegateEffect(event_value) + end + local c=e:GetHandler() + --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,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c: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 \ No newline at end of file diff --git a/official/c27519978.lua b/official/c27519978.lua new file mode 100644 index 0000000000..a095808a80 --- /dev/null +++ b/official/c27519978.lua @@ -0,0 +1,69 @@ +--四花繚乱の霊使い +--Four Charmers in Profusion +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ monsters + Link.AddProcedure(c,nil,2) + --atk up + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(function(e,c) return 300*Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil):GetBinClassCount(Card.GetAttribute) end) + c:RegisterEffect(e1) + --special summon + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET|EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spchk(sg,e,tp) + local t=sg:GetClassCount(Card.GetRace) + local a=sg:GetClassCount(Card.GetAttribute) + return (t==1 and a==#sg) or (a==1 and t==#sg) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and aux.SelectUnselectGroup(g,e,tp,2,2,s.spchk,0) end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.spchk,1,tp,HINTMSG_SPSUMMON) + Duel.SetTargetCard(sg) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,#sg,0,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end + local c=e:GetHandler() + local tg=Duel.GetTargetCards(e) + if #tg==2 and Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)>0 then + local g=Duel.GetOperatedGroup() + if c:IsRelateToEffect(e) then g=g+c end + for tc in g:Iter() do + 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_CANNOT_BE_MATERIAL) + e1:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ,SUMMON_TYPE_LINK)) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) + tc:RegisterEffect(e1) + end + end +end \ No newline at end of file diff --git a/official/c27632520.lua b/official/c27632520.lua new file mode 100644 index 0000000000..06ff71ea9f --- /dev/null +++ b/official/c27632520.lua @@ -0,0 +1,83 @@ +--妖精伝姫-ウィキャット +--Fairy Tail - Wickat +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 Spellcaster monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),4,2) + --"Fairy Tail" monsters you control whose original Attribute is LIGHT are unaffected by your opponent's activated effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_IMMUNE_EFFECT) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_FAIRY_TAIL) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) end) + e1:SetValue(function(e,te) return te:GetOwnerPlayer()==1-e:GetHandlerPlayer() and te:IsActivated() end) + c:RegisterEffect(e1) + --Send that many "Fairy Tail" cards from your Deck to the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(Cost.DetachFromSelf(1,s.tgmaxcost,function(e,og) e:SetLabel(#og) end)) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) + --Special Summon this card, and if you do, send that monster to the GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +s.listed_series={SET_FAIRY_TAIL} +function s.tgfilter(c) + return c:IsSetCard(SET_FAIRY_TAIL) and c:IsAbleToGrave() +end +function s.tgmaxcost(e,tp) + return math.min(2,Duel.GetMatchingGroupCount(s.tgfilter,tp,LOCATION_DECK,0,nil)) +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,e:GetLabel(),tp,LOCATION_DECK) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local ct=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,ct,ct,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end +function s.sptgfilter(c) + return c:IsSetCard(SET_FAIRY_TAIL) and c:IsOriginalAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGrave() and c:IsFaceup() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.sptgfilter(chkc,tp) end + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.sptgfilter,tp,LOCATION_MZONE,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectTarget(tp,s.sptgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,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.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 + and tc:IsRelateToEffect(e) then + Duel.SendtoGrave(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c30698243.lua b/official/c30698243.lua new file mode 100644 index 0000000000..0b2593706a --- /dev/null +++ b/official/c30698243.lua @@ -0,0 +1,96 @@ +--スカーレッド・ハイパーノヴァ・ドラゴン +--Red Hypernova Dragon +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 4 Tuners + 1+ non-Tuner Synchro Monsters + Synchro.AddProcedure(c,nil,4,4,Synchro.NonTunerEx(Card.IsType,TYPE_SYNCHRO),1,99) + --Multiple Tuners + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_MULTIPLE_TUNERS) + c:RegisterEffect(e0) + --Must first be Synchro Summoned with the above materials + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_CONDITION) + e1:SetValue(s.splimit) + c:RegisterEffect(e1) + --atk 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) + --cannot target + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetRange(LOCATION_MZONE) + e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e3:SetValue(aux.tgoval) + c:RegisterEffect(e3) + --indes + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_SINGLE) + e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e4:SetRange(LOCATION_MZONE) + e4:SetValue(aux.indoval) + c:RegisterEffect(e4) + --banish + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,0)) + e5:SetCategory(CATEGORY_REMOVE|CATEGORY_SPECIAL_SUMMON) + e5:SetType(EFFECT_TYPE_QUICK_O) + e5:SetCode(EVENT_FREE_CHAIN) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1) + e5:SetTarget(s.rmtg) + e5:SetOperation(s.rmop) + e5:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e5) +end +s.listed_names={97489701} +s.synchro_nt_required=1 +function s.splimit(e,se,sp,st) + return not e:GetHandler():IsLocation(LOCATION_EXTRA) or ((st&SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO and not se) +end +function s.atkval(e,c) + return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_TUNER)*500 +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemove() end + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) + g:AddCard(c) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spfilter(c,e,tp) + return c:IsCode(97489701) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) + if c:IsRelateToEffect(e) and c:IsAbleToRemove() then g:AddCard(c) end + if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then + local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) + if #sg>=0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=sg:Select(tp,1,1,nil):GetFirst() + if not sc then return end + sc:SetMaterial(nil) + Duel.BreakEffect() + if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + end + end + end +end \ No newline at end of file diff --git a/official/c31411835.lua b/official/c31411835.lua new file mode 100644 index 0000000000..9a2cdd0aac --- /dev/null +++ b/official/c31411835.lua @@ -0,0 +1,54 @@ +--見えざる手ダンダロス +--Hecahands Dandalos +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2 "Hecahands" monsters + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HECAHANDS),2) + --You can 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_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.ctrltg) + e1:SetOperation(s.ctrlop) + c:RegisterEffect(e1) + --Your "Hecahands" Fusion Monsters and your monsters that are owned by your opponent can attack directly + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_DIRECT_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetTarget(function(e,c) return (c:IsSetCard(SET_HECAHANDS) and c:IsFusionMonster()) or c:IsOwner(1-e:GetHandlerPlayer()) end) + c:RegisterEffect(e2) + --If this card battles a monster, neither can be destroyed by that battle + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e3:SetRange(LOCATION_MZONE) + e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e3:SetTarget(s.indestg) + e3:SetValue(1) + c:RegisterEffect(e3) +end +s.listed_series={SET_HECAHANDS} +function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) 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.ctrlop(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.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end \ No newline at end of file diff --git a/official/c31533473.lua b/official/c31533473.lua new file mode 100644 index 0000000000..55d952a939 --- /dev/null +++ b/official/c31533473.lua @@ -0,0 +1,71 @@ +--道化の一座 ディアボロ +--Clown Crew Diablo +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2 monsters with the same Attribute but different Types + Fusion.AddProcMixN(c,true,true,s.fusfilter,2) + --If your Tribute Summoned monster attacks a Defense Position monster, inflict double piercing battle damage to your opponent + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_PIERCE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsTributeSummoned)) + e1:SetValue(DOUBLE_DAMAGE) + c:RegisterEffect(e1) + --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Diablo" once per turn) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_RELEASE) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_CLOWN_CREW} +function s.fusfilter(c,fc,sumtype,sp,sub,mg,sg) + return not sg or sg:FilterCount(aux.TRUE,c)==0 + or (sg:IsExists(Card.IsAttribute,1,c,c:GetAttribute(),fc,sumtype,sp) and not sg:IsExists(Card.IsRace,1,c,c:GetRace(),fc,sumtype,sp)) +end +function s.setfilter(c) + return c:IsSetCard(SET_CLOWN_CREW) and c:IsTrap() and c:IsSSetable() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(aux.AND(Card.IsFusionMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+1) + and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_TOEXTRA) + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,PLAYER_ALL,LOCATION_MZONE|LOCATION_GRAVE) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_SET) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Return all Fusion Monsters on the field and in the GYs to the Extra Deck + local g=Duel.GetMatchingGroup(aux.AND(Card.IsFusionMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) + if #g>0 then + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + elseif op==2 then + --● Set 1 "Clown Crew" Trap from your Deck + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end + end +end \ No newline at end of file diff --git a/official/c3294539.lua b/official/c3294539.lua new file mode 100644 index 0000000000..01294eea9a --- /dev/null +++ b/official/c3294539.lua @@ -0,0 +1,70 @@ +-- クリムゾン・ブレード・ドラゴン +--Crimson Blade Dragon +local s,id=GetID() +local CARD_CRIMSON_BLADER=80321197 +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 "Resonator" Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_RESONATOR),1,1,Synchro.NonTuner(nil),1,99) + --Take 1 Level 8 or higher monster from your Deck or GY that cannot be Normal Summoned/Set, and either Special Summon it (but negate its effects) or add it to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+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:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.thsptg) + e1:SetOperation(s.thspop) + c:RegisterEffect(e1) + --Destroy that monster + 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:SetCode(EVENT_BATTLE_START) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_CRIMSON_BLADER} +s.listed_series={SET_RESONATOR} +function s.thspfilter(c,e,tp,mmz_chk) + return c:IsLevelAbove(8) and not c:IsSummonableCard() 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 return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,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 + aux.ToHandOrElse(sc,tp, + function() + return mmz_chk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) + end, + function() + if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(e:GetHandler()) + end + Duel.SpecialSummonComplete() + end, + aux.Stringid(id,3) + ) +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:IsFaceup() and bc:IsLevelAbove(5) 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/c38354018.lua b/official/c38354018.lua new file mode 100644 index 0000000000..526d42f3a1 --- /dev/null +++ b/official/c38354018.lua @@ -0,0 +1,72 @@ +--超弩級砲塔列車フライング・ランチャー +--Superdreadnought Rail Cannon Flying Launcher +--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) + --You can Normal Summon 1 Machine monster during your Main Phase each turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsRace(RACE_MACHINE) end) + c:RegisterEffect(e1) + --Add 1 EARTH Machine monster or "Barrage Blast" 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,0}) + e2:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Destroy Spells/Traps on the field equal to the number of materials detached + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCost(Cost.DetachFromSelf(1,function(e,tp) return Duel.GetTargetCount(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) end,function(e,og) e:SetLabel(#og) end)) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) +end +s.listed_names={51369889} --"Barrage Blast" +function s.thfilter(c) + return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE)) or c:IsCode(51369889)) 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.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + local ct=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,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/official/c39576656.lua b/official/c39576656.lua new file mode 100644 index 0000000000..fbf4b8ae31 --- /dev/null +++ b/official/c39576656.lua @@ -0,0 +1,110 @@ +--キラーチューン・クラックル +--Kewl Tune Crackle +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: "Kewl Tune Clip" + 1+ Tuners + Synchro.AddProcedure(c,aux.FALSE,1,1,s.tunerfilter,1,99,aux.FilterSummonCode(43904702)) + --If this card is Synchro Summoned: You can look at your opponent's Extra Deck, and if you do, banish (face-up) 1 card from it (until the End Phase), then you can make this card gain ATK equal to the banished monster's + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+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:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.bantg) + e1:SetOperation(s.banop) + c:RegisterEffect(e1) + --If this Synchro Summoned card is sent to the GY: You can Special Summon this card, then you can look at your opponent's Extra Deck, and if you do, banish (face-up) 2 cards from it until the End Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) local c=e:GetHandler() return c:IsSynchroSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Multiple tuners + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_MATERIAL_CHECK) + e3:SetValue(s.valcheck) + c:RegisterEffect(e3) +end +s.listed_names={43904702} --"Kewl Tune Clip" +s.material={43904702} +function s.tunerfilter(c,scard,sumtype,tp) + return c:IsType(TYPE_TUNER,scard,sumtype,tp) or c:IsHasEffect(EFFECT_CAN_BE_TUNER) +end +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 and Duel.IsPlayerCanRemove(tp) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,0) +end +function s.banop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) + if #g==0 then return end + Duel.ConfirmCards(tp,g) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local rc=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil):GetFirst() + if rc and aux.RemoveUntil(rc,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY,PHASE_END,id,e,tp,s.retop,nil,nil,nil,nil,aux.Stringid(id,2)) + and rc:IsLocation(LOCATION_REMOVED) and rc:IsFaceup() then + local c=e:GetHandler() + local atk=rc:GetAttack() + if c:IsRelateToEffect(e) and c:IsFaceup() and atk>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + --Make this card gain ATK equal to the banished monster's + c:UpdateAttack(atk) + end + end + Duel.ShuffleExtra(1-tp) +end +function s.retop(ag) + local facedown_g,faceup_g=ag:Split(Card.IsPreviousPosition,nil,POS_FACEDOWN) + if #facedown_g>0 then + Duel.SendtoDeck(facedown_g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + Duel.ShuffleExtra(facedown_g:GetFirst():GetControler()) + end + if #faceup_g>0 then + Duel.SendtoExtraP(faceup_g,nil,REASON_EFFECT) + end +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_REMOVE,nil,2,1-tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end + local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) + if #g<2 or not Duel.IsPlayerCanRemove(tp) or not Duel.SelectYesNo(tp,aux.Stringid(id,4)) then return end + Duel.BreakEffect() + Duel.ConfirmCards(tp,g) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local rg=g:FilterSelect(tp,Card.IsAbleToRemove,2,2,nil) + if #rg==2 then + aux.RemoveUntil(rg,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY,PHASE_END,id,e,tp,s.retop,nil,nil,nil,nil,aux.Stringid(id,5)) + end + Duel.ShuffleExtra(1-tp) +end +function s.valcheck(e,c) + local g=c:GetMaterial() + if g:IsExists(function(c) return c:IsType(TYPE_TUNER) or c:IsHasEffect(EFFECT_CAN_BE_TUNER) end,2,nil) then + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_MULTIPLE_TUNERS) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)|RESET_PHASE|PHASE_END) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c4026187.lua b/official/c4026187.lua new file mode 100644 index 0000000000..98440fdf4e --- /dev/null +++ b/official/c4026187.lua @@ -0,0 +1,92 @@ +--妖精伝姫を語る者 +--Chronicler of Fairy Tail Tales +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 LIGHT "Fairy Tail" monster + 1 Spellcaster monster + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) + --Your "Fairy Tail" monsters cannot be destroyed by battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_FAIRY_TAIL) end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Destroy as many cards your opponent controls as possible, and if you do, inflict 500 damage to your opponent for each card destroyed + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SPSUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,0}) + e2a:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e:GetLabel()==1 end) + e2a:SetTarget(s.destg) + e2a:SetOperation(s.desop) + c:RegisterEffect(e2a) + local e2b=Effect.CreateEffect(c) + e2b:SetType(EFFECT_TYPE_SINGLE) + e2b:SetCode(EFFECT_MATERIAL_CHECK) + e2b:SetValue(function(e,c) e2a:SetLabel(c:GetMaterial():IsExists(Card.IsCode,1,nil,CARD_FAIRY_PRINCE) and 1 or 0) end) + c:RegisterEffect(e2b) + --Negate the activation of an opponent's card or effect, and if you do, destroy that card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + 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(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) + e3:SetCost(s.negcost) + e3:SetTarget(s.negtg) + e3:SetOperation(s.negop) + c:RegisterEffect(e3) +end +s.listed_series={SET_FAIRY_TAIL} +s.listed_names={CARD_FAIRY_PRINCE} +s.material_setcode={SET_FAIRY_TAIL} +function s.matfilter(c,fc,sumtype,tp) + return c:IsAttribute(ATTRIBUTE_LIGHT,fc,sumtype,tp) and c:IsSetCard(SET_FAIRY_TAIL,fc,sumtype,tp) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) + if #g>0 then + local dam=Duel.Destroy(g,REASON_EFFECT)*500 + if dam>0 then + Duel.Damage(1-tp,dam,REASON_EFFECT) + end + end +end +function s.negcostfilter(c) + return c:IsSetCard(SET_FAIRY_TAIL) and c:IsAbleToRemoveAsCost() +end +function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.negcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.negcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local rc=re:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + if rc:IsDestructable() and rc:IsRelateToEffect(re) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + end +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c42719764.lua b/official/c42719764.lua new file mode 100644 index 0000000000..ce26c07b9d --- /dev/null +++ b/official/c42719764.lua @@ -0,0 +1,52 @@ +--サモンショック +--Summon Shock +local s,id=GetID() +local COUNTER_SUMMON=0x148 +function s.initial_effect(c) + c:EnableCounterPermit(COUNTER_SUMMON) + c:SetCounterLimit(COUNTER_SUMMON,4) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + e0:SetHintTiming(0,TIMING_STANDBY_PHASE) + c:RegisterEffect(e0) + --Each time a monster(s) is Normal or Special Summoned, place 1 Summon Counter on this card (max. 4) + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetRange(LOCATION_SZONE) + e1a:SetOperation(s.counterop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --If the 4th Summon Counter is placed on this card: Remove all Summon Counters from this card, and if you do, send all monsters on the field to the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_CUSTOM+id) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) +end +s.counter_place_list={COUNTER_SUMMON} +function s.counterop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:AddCounter(COUNTER_SUMMON,1) and c:GetCounter(COUNTER_SUMMON)==4 then + Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id,re,0,0,tp,0) + end +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_MZONE) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) + if c:IsRelateToEffect(e) and c:RemoveCounter(tp,COUNTER_SUMMON,c:GetCounter(COUNTER_SUMMON),REASON_EFFECT) + and c:GetCounter(COUNTER_SUMMON)==0 and #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c42759961.lua b/official/c42759961.lua new file mode 100644 index 0000000000..5f0ffe9087 --- /dev/null +++ b/official/c42759961.lua @@ -0,0 +1,84 @@ +--道化の一座 フレア +--Clown Crew Flare +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --You can reveal this card in your hand; add 1 non-Ritual "Clown Crew" card from your Deck to your hand, then discard 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Flare" once per turn) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_RELEASE) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_CLOWN_CREW} +function s.thfilter(c) + return c:IsSetCard(SET_CLOWN_CREW) and not c:IsRitualMonster() 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) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(aux.AND(Card.IsRitualMonster,Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+1) + and Duel.IsExistingMatchingCard(aux.AND(Card.IsEffectMonster,Card.IsCanTurnSet),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_TODECK) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_MZONE|LOCATION_GRAVE) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_POSITION+CATEGORY_SET) + Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_EITHER,POS_FACEDOWN_DEFENSE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Shuffle all Ritual Monsters on the field and in the GYs into the Deck + local g=Duel.GetMatchingGroup(aux.AND(Card.IsRitualMonster,Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) + if #g>0 then + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + elseif op==2 then + --● Change 1 Effect Monster on the field to face-down Defense Position + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsEffectMonster,Card.IsCanTurnSet),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) + end + end +end \ No newline at end of file diff --git a/official/c43471513.lua b/official/c43471513.lua new file mode 100644 index 0000000000..4655f1ee50 --- /dev/null +++ b/official/c43471513.lua @@ -0,0 +1,79 @@ +--コンベックス・ナイト +--Convex Knight +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If a Machine monster is on the field and this card is in your hand: You can Special Summon this card in Defense Position, then you can make its Level become equal to the Level/Rank of 1 Machine monster on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_MACHINE),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --During your Main Phase: You can send 1 EARTH Machine monster from your Deck to the GY, then this card gains ATK equal to the sent monster's Level x 100 until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) +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,POS_FACEUP_DEFENSE) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_LVCHANGE,c,1,tp,0) +end +function s.lvfilter(c,lv) + return ((c:HasLevel() and not c:IsLevel(lv)) or (c:HasRank() and not c:IsRank(lv))) + and c:IsRace(RACE_MACHINE) and c:IsFaceup() +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local lv=c:GetLevel() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 + and Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,lv) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + local sc=Duel.SelectMatchingCard(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,lv):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + local lv_rnk=(sc:HasLevel() and sc:GetLevel()) + or (sc:HasRank() and sc:GetRank()) + Duel.BreakEffect() + --Make its Level become equal to the Level/Rank of 1 Machine monster on the field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(lv_rnk) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end +end +function s.tgfilter(c) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,0) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) + and c:IsRelateToEffect(e) and c:IsFaceup() then + Duel.BreakEffect() + --This card gains ATK equal to the sent monster's Level x 100 until the end of this turn + c:UpdateAttack(sc:GetLevel()*100,RESETS_STANDARD_DISABLE_PHASE_END) + end +end \ No newline at end of file diff --git a/official/c43871165.lua b/official/c43871165.lua new file mode 100644 index 0000000000..9f5bc6dd76 --- /dev/null +++ b/official/c43871165.lua @@ -0,0 +1,143 @@ +--獄神影機-ゼグレド +--Power Patron Shadow Machine Zegredo +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --During your Main Phase: You can destroy both this card and 1 "Power Patron" or "DoomZ" monster in your hand or face-up field, then you can destroy 1 card on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.pdestg) + e1:SetOperation(s.pdesop) + c:RegisterEffect(e1) + --You can banish (face-down) the top 3 cards of your Deck; destroy this card, and if you do, Special Summon 1 "Jupiter the Power Patron of Destruction" from your Extra Deck (this is treated as an Xyz Summon), then you can attach 1 card from your hand to it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.mdescost) + e2:SetTarget(s.mdestg) + e2:SetOperation(s.mdesop) + c:RegisterEffect(e2) + --If this card is added to your Extra Deck face-up: You can add 1 "Power Patron" or "DoomZ" Spell/Trap from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_DECK) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.thcon) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_names={68231287} --"Jupiter the Power Patron of Destruction" +s.listed_series={SET_POWER_PATRON,SET_DOOMZ} +function s.pdesfilter(c) + return c:IsSetCard({SET_POWER_PATRON,SET_DOOMZ}) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsMonster() +end +function s.pdestg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.pdesfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),2,tp,LOCATION_PZONE|LOCATION_MZONE|LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.pdesop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g1=Duel.SelectMatchingCard(tp,s.pdesfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,nil) + if #g1==0 then return end + if g1:GetFirst():IsOnField() then Duel.HintSelection(g1) end + if Duel.Destroy(g1+c,REASON_EFFECT)~=2 then return end + local dg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + if #dg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g2=dg:Select(tp,1,1,nil) + if #g2>0 then + Duel.HintSelection(g2) + Duel.BreakEffect() + Duel.Destroy(g2,REASON_EFFECT) + end +end +function s.mdescost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetDecktopGroup(tp,3) + if chk==0 then return g:IsExists(Card.IsAbleToRemoveAsCost,3,nil,POS_FACEDOWN) end + Duel.DisableShuffleCheck() + Duel.Remove(g,POS_FACEDOWN,REASON_COST) +end +function s.jupiterspfilter(c,e,tp,hc) + return c:IsCode(68231287) and Duel.GetLocationCountFromEx(tp,tp,hc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) +end +function s.mdestg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.jupiterspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.mdesop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local xc=Duel.SelectMatchingCard(tp,s.jupiterspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if not xc then return end + xc:SetMaterial(nil) + if Duel.SpecialSummon(xc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end + xc:CompleteProcedure() + local g=Duel.GetMatchingGroup(Card.IsCanBeXyzMaterial,tp,LOCATION_HAND,0,nil,xc,tp,REASON_EFFECT) + if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,4)) then return end + local attg=g:Select(tp,1,1,nil) + if #attg>0 then + Duel.BreakEffect() + Duel.Overlay(xc,attg) + end +end +function s.spfilter(c,e,tp) + if not c:IsSetCard({SET_POWER_PATRON,SET_ARTMAGE}) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end + if c:IsLocation(LOCATION_DECK) then + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + else + return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)==0 + end +end +function s.spcon(e) + local c=e:GetHandler() + return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thcon(e) + local c=e:GetHandler() + return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() +end +function s.thfilter(c) + return c:IsSetCard({SET_POWER_PATRON,SET_DOOMZ}) 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 diff --git a/official/c43932352.lua b/official/c43932352.lua new file mode 100644 index 0000000000..b546a2048c --- /dev/null +++ b/official/c43932352.lua @@ -0,0 +1,70 @@ +--見えざる導き手 +--Bayt'al-Hecahands +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --You can Tribute 1 monster you control that is a "Hecahands" monster or a monster owned by your opponent; take control of 1 monster your opponent controls + 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_SZONE) + e1:SetCountLimit(1,id) + e1:SetCost(s.ctrlcost) + e1:SetTarget(s.ctrltg) + e1:SetOperation(s.ctrlop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --Once per turn, during your End Phase: Send 1 card you control to the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) +end +s.listed_series={SET_HECAHANDS} +function s.ctrlcostfilter(c,tp,opp) + return (c:IsSetCard(SET_HECAHANDS) or c:IsOwner(opp)) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 + and Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,c) +end +function s.ctrlcost(e,tp,eg,ep,ev,re,r,rp,chk) + local opp=1-tp + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.ctrlcostfilter,1,false,nil,nil,tp,opp) end + local g=Duel.SelectReleaseGroupCost(tp,s.ctrlcostfilter,1,1,false,nil,nil,tp,opp) + Duel.Release(g,REASON_COST) +end +function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) +end +function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.GetControl(g,tp) + end +end +function s.tgtg(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_ONFIELD) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c44654994.lua b/official/c44654994.lua new file mode 100644 index 0000000000..bfdf339bda --- /dev/null +++ b/official/c44654994.lua @@ -0,0 +1,58 @@ +--アルトメギア・インパスト -奪還- +--Artmage Impact -Recapture- +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If you control an "Artmage" monster, you can activate this card the turn it was Set + 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:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ARTMAGE),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end) + c:RegisterEffect(e0) + --When your opponent activates a monster effect: Banish 1 Fusion Monster you control (until the End Phase), and if you do, negate the activation, and if you do that, destroy that card, then if you have 3 or more different Monster Types on your field, you can return all Spells/Traps your opponent controls to the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_series={SET_ARTMAGE} +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) +end +function s.banfilter(c) + return c:IsFusionMonster() and c:IsFaceup() and c:IsAbleToRemove() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.banfilter,tp,LOCATION_MZONE,0,1,nil) end + local rc=re:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + if rc:IsDestructable() and rc:IsRelateToEffect(re) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_ONFIELD) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.banfilter,tp,LOCATION_MZONE,0,1,1,nil) + if #g==0 then return end + Duel.HintSelection(g) + if aux.RemoveUntil(g,nil,REASON_EFFECT,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp) and Duel.NegateActivation(ev) + and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 + and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetBinClassCount(Card.GetRace)>=3 + and Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + local rg=Duel.GetMatchingGroup(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,nil) + if #rg>0 then + Duel.BreakEffect() + Duel.SendtoHand(rg,nil,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c44694191.lua b/official/c44694191.lua new file mode 100644 index 0000000000..83e8574428 --- /dev/null +++ b/official/c44694191.lua @@ -0,0 +1,90 @@ +--仮初の幻臉師 +--Transient Masquerader of Illusion +local s,id=GetID() +function s.initial_effect(c) + --If this card is Normal or Special Summoned: You can send 1 Fiend, Illusion, or Spellcaster monster from your Deck to the GY, then you can change this card's Type to the sent monster's original Type + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOGRAVE) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,{id,0}) + e1a:SetTarget(s.tgtg) + e1a:SetOperation(s.tgop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --If this card battles a monster, neither can be destroyed by that battle + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e2:SetTarget(s.indestg) + e2:SetValue(1) + c:RegisterEffect(e2) + --If this card is in your GY: You can banish 1 Spell from your GY; Special Summon this card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) + e3:SetCost(s.spcost) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +function s.tgfilter(c) + return c:IsRace(RACE_FIEND|RACE_ILLUSION|RACE_SPELLCASTER) and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) then + local original_type=sc:GetOriginalRace() + if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsRaceExcept(original_type) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + --Change this card's Type to the sent monster's original Type + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_RACE) + e1:SetValue(original_type) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end + end +end +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.spcostfilter(c) + return c:IsSpell() and c:IsAbleToRemoveAsCost() +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +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 \ No newline at end of file diff --git a/official/c44716748.lua b/official/c44716748.lua new file mode 100644 index 0000000000..01fd3aeaa3 --- /dev/null +++ b/official/c44716748.lua @@ -0,0 +1,160 @@ +--糾罪巧γ’-「exapatisIA」 +--Trito Enneacraft - "exapatisIA" +local s,id=GetID() +function s.initial_effect(c) + c:EnableCounterPermit(COUNTER_EC,LOCATION_PZONE) + Pendulum.AddProcedure(c) + --Each time a monster(s) is flipped face-up, place 1 E.C. Counter on this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_FLIP) + e1:SetRange(LOCATION_PZONE) + e1:SetOperation(s.counterop) + c:RegisterEffect(e1) + --Reveal 3 "Enneacraft" cards from your Deck, your opponent randomly picks 1 for you to add to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_PZONE) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.PayLP(900)) + e2:SetTarget(s.rvtg) + e2:SetOperation(s.rvop) + c:RegisterEffect(e2) + --FLIP: Destroy 1 Spell/Trap your opponent controls, and if you do, Special Summon 1 monster from your hand in face-down Defense Position + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_SET) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e3:SetCode(EVENT_FLIP) + e3:SetTarget(s.fliptg) + e3:SetOperation(s.flipop) + c:RegisterEffect(e3) + --Add 1 "Enneacraft" card from your Deck to your hand + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e4:SetType(EFFECT_TYPE_QUICK_O) + e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e4:SetCode(EVENT_CHAINING) + e4:SetRange(LOCATION_MZONE) + e4:SetCondition(function(e,tp,eg,ep,ev,re) return e:GetHandler():IsFacedown() and ep==1-tp and re:IsHasCategory(CATEGORY_SET) end) + e4:SetCost(Cost.SelfChangePosition(POS_FACEUP_DEFENSE)) + e4:SetTarget(s.thtg) + e4:SetOperation(s.thop) + c:RegisterEffect(e4) + --Special Summon 1 monster from your hand in face-down Defense Position + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,3)) + e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SET) + e5:SetType(EFFECT_TYPE_IGNITION) + e5:SetRange(LOCATION_HAND) + e5:SetCost(Cost.AND(Cost.SelfReveal,s.spcost)) + e5:SetTarget(s.sptg) + e5:SetOperation(s.spop) + c:RegisterEffect(e5) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsPosition(POS_FACEDOWN_DEFENSE) end) +end +s.counter_place_list={COUNTER_EC} +s.listed_series={SET_ENNEACRAFT} +function s.counterop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not Duel.IsChainSolving() then + c:AddCounter(COUNTER_EC,1) + else + --Place 1 E.C. Counter on this card 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_PZONE) + e1:SetOperation(function() c:AddCounter(COUNTER_EC,1) 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.rvfilter(c) + return c:IsSetCard(SET_ENNEACRAFT) and c:IsAbleToHand() and not c:IsPublic() +end +function s.rvtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.rvfilter,tp,LOCATION_DECK,0,3,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.rvop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectMatchingCard(tp,s.rvfilter,tp,LOCATION_DECK,0,3,3,nil) + if #g~=3 then return end + Duel.ConfirmCards(1-tp,g) + local sg=g:RandomSelect(1-tp,1) + Duel.ShuffleDeck(tp) + if #sg>0 then + Duel.DisableShuffleCheck() + Duel.SendtoHand(sg,nil,REASON_EFFECT) + end +end +function s.fliptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.flipop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) + if #dg==0 then return end + Duel.HintSelection(dg) + if Duel.Destroy(dg,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,1,nil,e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) + end + end +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end + --You cannot Special Summon the turn you activate this effect, except in face-down Defense Position + 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_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_FORCE_SPSUMMON_POSITION) + e1:SetTargetRange(1,0) + e1:SetValue(POS_FACEDOWN_DEFENSE) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,nil,e,0,tp,false,false,POS_FACEDOWN_DEFENSE) 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,Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,1,nil,e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_ENNEACRAFT) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c44886582.lua b/official/c44886582.lua new file mode 100644 index 0000000000..88a54c49fa --- /dev/null +++ b/official/c44886582.lua @@ -0,0 +1,71 @@ +--超逸融合 +--Apex Polymerization +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON|CATEGORY_FUSION_SUMMON|CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(Cost.PayLP(2000)) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +function s.filter(c,e,tp) + return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:HasLevel() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) +end +function s.spfilter(c,e,tp,tc) + return c:IsRace(tc:GetRace()) and c:IsAttribute(tc:GetAttribute()) + and c:HasLevel() and not c:IsLevel(tc:GetLevel()) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + if e:IsHasType(EFFECT_TYPE_ACTIVATE) then + Duel.SetChainLimit(aux.FALSE) + end +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then + sc:NegateEffects(e:GetHandler()) + Duel.BreakEffect() + local fusion_params={matfilter=Fusion.OnFieldMat,extrafil=s.fextra(tc,sc)} + local b1=Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) + local b2=sc:IsAbleToGrave() + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + if op==1 then + Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) + elseif op==2 then + Duel.SendtoGrave(sc,REASON_EFFECT) + end + end +end +function s.fextra(tc,sc) + return function(e,tp,mg) + return Group.FromCards(tc),s.fcheck(tc,sc) + end +end +function s.fcheck(tc,sc) + return function(tp,sg,fc) + return #sg==2 and sg:IsContains(tc) and sg:IsContains(sc) + end +end diff --git a/official/c44994712.lua b/official/c44994712.lua new file mode 100644 index 0000000000..31ef8470dc --- /dev/null +++ b/official/c44994712.lua @@ -0,0 +1,99 @@ +--捕食植物ロンギネフィラ +--Predaplant Longinephila +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Predap" card from your Deck to your hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,{id,0}) + e1a:SetTarget(s.thtg) + e1a:SetOperation(s.thop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --Activate 1 of the following effects (Place Predator Counter, Set "Polymerization" from GY or banishment) + 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:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_PREDAP} +s.listed_names={CARD_POLYMERIZATION,id} +s.counter_place_list={COUNTER_PREDATOR} +function s.predapthfilter(c) + return c:IsSetCard(SET_PREDAP) and c:IsAbleToHand() and not c:IsCode(id) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.predapthfilter,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.predapthfilter,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.predctfilter(c) + return c:IsFaceup() and c:IsCanAddCounter(COUNTER_PREDATOR,1) +end +function s.polysetfilter(c) + return c:IsCode(CARD_POLYMERIZATION) and c:IsFaceup() and c:IsSSetable() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(s.predctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + local b2=Duel.IsExistingMatchingCard(s.polysetfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_COUNTER) + Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,tp,COUNTER_PREDATOR) + elseif op==2 then + e:SetCategory(CATEGORY_SET) + Duel.SetPossibleOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Place 1 Predator Counter on 1 monster on the field and make it Level 1 so long as it has a Predator Counter if it is Level 2 or higher + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) + local tc=Duel.SelectMatchingCard(tp,s.predctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + if not tc then return end + Duel.HintSelection(tc) + if tc:AddCounter(COUNTER_PREDATOR,1) and tc:IsLevelAbove(2) then + --It becomes Level 1 as long as it has a Predator Counter + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetCondition(function(e) return e:GetHandler():HasCounter(COUNTER_PREDATOR) end) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + elseif op==2 then + --Set 1 "Polymerization" from your GY or banishment + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.polysetfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + if #sg>0 then + Duel.HintSelection(sg) + Duel.SSet(tp,sg) + end + end +end \ No newline at end of file diff --git a/official/c45116390.lua b/official/c45116390.lua new file mode 100644 index 0000000000..78f1d5b09f --- /dev/null +++ b/official/c45116390.lua @@ -0,0 +1,88 @@ +--重装騎士バベルデッカー +--Heavy Knight Babel Decker +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can Normal Summon this card without Tributing + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SUMMON_PROC) + e1:SetCondition(s.ntcon) + c:RegisterEffect(e1) + --Special Summon 1 EARTH Machine monster from your hand + 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_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,0}) + e2a:SetTarget(s.handsptg) + e2a:SetOperation(s.handspop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --Special Summon 1 Rank 10 EARTH Machine Xyz Monster from your Extra Deck using this card you control as material (this is treated as an Xyz Summon) + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp) return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 end) + e3:SetTarget(s.extrasptg) + e3:SetOperation(s.extraspop) + c:RegisterEffect(e3) + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,aux.FALSE) +end +function s.ntcon(e,c,minc) + if c==nil then return true end + return minc==0 and c:IsLevelAbove(4) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 +end +function s.handspfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.handsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.handspop(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.handspfilter,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.extraspfilter(c,e,tp,mc) + return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(10) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) + and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) +end +function s.extrasptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) + and Duel.IsExistingMatchingCard(s.extraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.extraspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + if #pg>1 or (#pg==1 and not pg:IsContains(c)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local xc=Duel.SelectMatchingCard(tp,s.extraspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c):GetFirst() + if not xc then return end + xc:SetMaterial(c) + Duel.Overlay(xc,c) + if Duel.SpecialSummon(xc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + xc:CompleteProcedure() + end +end \ No newline at end of file diff --git a/official/c45508030.lua b/official/c45508030.lua new file mode 100644 index 0000000000..68fa7de8da --- /dev/null +++ b/official/c45508030.lua @@ -0,0 +1,71 @@ +--憑依共鳴 +--Possessed Resonance +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --special summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON|CATEGORY_POSITION|CATEGORY_SET) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_POSITION) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.postg) + e2:SetOperation(s.posop) + c:RegisterEffect(e2) +end +s.listed_series={SET_CHARMER,SET_FAMILIAR_POSSESSED} +function s.filter(c,e,tp) + return c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,c:GetAttribute()) +end +function s.spfilter(c,e,tp,att) + return c:IsSetCard({SET_CHARMER,SET_FAMILIAR_POSSESSED}) and c:IsAttribute(att) + and c:IsCanBeSpecialSummoned(e,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,g,1,tp,POS_FACEDOWN_DEFENSE) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetAttribute()) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)~=0 + and tc:IsCanTurnSet() and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) + end + end +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsCanChangePosition() end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,0) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) + end +end \ No newline at end of file diff --git a/official/c45538320.lua b/official/c45538320.lua new file mode 100644 index 0000000000..b6afd02f8d --- /dev/null +++ b/official/c45538320.lua @@ -0,0 +1,107 @@ +--精霊術の使い魔 +--Familiars of the Spiritual Arts +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --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:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --change type/attribute + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.chngtg) + e3:SetOperation(s.chngop) + c:RegisterEffect(e3) + --special summon + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(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,2}) + e4:SetCondition(s.spcon) + e4:SetTarget(s.sptg) + e4:SetOperation(s.spop) + c:RegisterEffect(e4) +end +s.listed_names={38057522} +s.listed_series={SET_FAMILIAR_POSSESSED,SET_POSSESSED } +function s.thfilter(c) + return c:IsAbleToHand() and (c:IsCode(38057522) or (c:IsSpellTrap() and c:IsSetCard(SET_POSSESSED))) +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.chngtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local c=e:GetHandler() + local race=Duel.AnnounceRace(tp,1,RACE_ALL) + local attr=c:IsRaceExcept(race) and Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL) or c:AnnounceAnotherAttribute(tp) + e:SetLabel(race,attr) +end +function s.chngop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if (not c:IsFaceup() and c:IsRelateToEffect(e)) then return end + local race,attr=e:GetLabel() + if c:IsRaceExcept(race) then + --Change its Monster Type + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_RACE) + e1:SetValue(race) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + end + if c:IsAttributeExcept(attr) then + --Change its Attribute + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e2:SetValue(attr) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e2) + end +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return r&(REASON_BATTLE|REASON_EFFECT)>0 +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_SPELLCASTER) and c:IsDefense(1500) 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|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,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/c5148778.lua b/official/c5148778.lua new file mode 100644 index 0000000000..d51da63c4d --- /dev/null +++ b/official/c5148778.lua @@ -0,0 +1,118 @@ +--覇王暴竜スターヴ・ヴェノム・ウィング・ドラゴン +--Starving Venom Wing Dragon +--Scripted By The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + Pendulum.AddProcedure(c,false) + --Fusion Materials: 1 Fusion Monster + 1 "Clear Wing" monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_CLEAR_WING)) + --Place Predator Counters on monsters Special Summoned to your opponent's field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_PZONE) + e1:SetOperation(s.counterplaceop) + c:RegisterEffect(e1) + --If your opponent Special Summons a monster(s): You can target 1 of them; this card gains ATK equal to its ATK, and its effects are negated. + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(s.atknegeffcon) + e2:SetTarget(s.atknegefftg) + e2:SetOperation(s.atknegeffop) + c:RegisterEffect(e2) + --When another card or effect is activated on the field: You can destroy 1 card on the field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler()~=e:GetHandler() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&LOCATION_ONFIELD>0 end) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) + --Place itself into Pendulum Zone if it is destroyed + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_DESTROYED) + e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) + e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end local c=e:GetHandler() if c:IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) end end) + e4:SetOperation(s.penop) + c:RegisterEffect(e4) +end +s.listed_series={SET_CLEAR_WING} +s.material_setcode={SET_CLEAR_WING} +s.counter_place_list={COUNTER_PREDATOR} +function s.counterplaceop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=eg:Filter(Card.IsControler,nil,1-tp) + for tc in g:Iter() do + if tc:AddCounter(COUNTER_PREDATOR,1) and tc:IsLevelAbove(2) then + --It becomes Level 1 as long as it has a Predator Counter + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetCondition(function(e) return e:GetHandler():HasCounter(COUNTER_PREDATOR) end) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + end +end +function s.atknegefffilter(c,e,tp) + return c:IsSummonPlayer(1-tp) and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_MZONE) and c:HasNonZeroAttack() +end +function s.atknegeffcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.atknegefffilter,1,nil,e,tp) +end +function s.atknegefftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return eg:IsContains(chkc) and s.atknegefffilter(chkc,e,tp) end + if chk==0 then return eg:IsExists(s.atknegefffilter,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local tc=nil + if #eg==1 then + tc=eg:GetFirst() + Duel.SetTargetCard(tc) + else + tc=eg:FilterSelect(tp,s.atknegefffilter,1,1,nil,e,tp) + Duel.SetTargetCard(tc) + end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0) +end +function s.atknegeffop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() + and c:UpdateAttack(tc:GetAttack(),RESETS_STANDARD_DISABLE_PHASE_END) and tc:IsNegatableMonster() then + tc:NegateEffects(c,RESETS_STANDARD_PHASE_END) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD),1,tp,LOCATION_ONFIELD) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end +end +function s.penop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/official/c51669847.lua b/official/c51669847.lua new file mode 100644 index 0000000000..5ebc5dbca3 --- /dev/null +++ b/official/c51669847.lua @@ -0,0 +1,81 @@ +--絶無なる獄神界-ヴィードリア +--Null Power Patron Realm - Vidria +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --You can reveal 1 "Power Patron" monster in your Extra Deck; banish (face-down) 1 card from your hand, then add to your hand, or Special Summon, 1 monster from your Deck that mentions the revealed monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.Reveal(s.revealfilter,false,1,1,function(e,tp,g) e:SetLabel(g:GetFirst():GetCode()) end,LOCATION_EXTRA)) + e1:SetTarget(s.thsptg) + e1:SetOperation(s.thspop) + c:RegisterEffect(e1) + --Monsters your opponent controls lose 100 ATK for each banished card + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetRange(LOCATION_FZONE) + e2:SetTargetRange(0,LOCATION_MZONE) + e2:SetValue(function(e,c) return -100*Duel.GetFieldGroupCount(0,LOCATION_REMOVED,LOCATION_REMOVED) end) + c:RegisterEffect(e2) + --Your opponent cannot activate card effects in the GY while you control "Nerva the Power Patron of Creation", "Jupiter the Power Patron of Destruction", and "Junora the Power Patron of Tuning" + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e3:SetCode(EFFECT_CANNOT_ACTIVATE) + e3:SetRange(LOCATION_FZONE) + e3:SetTargetRange(0,1) + e3:SetCondition(s.cannotactcon) + e3:SetValue(function(e,re,tp) return re:GetActivateLocation()==LOCATION_GRAVE end) + c:RegisterEffect(e3) +end +s.listed_series={SET_POWER_PATRON} +s.listed_names={53589300,68231287,5914858} --"Nerva the Power Patron of Creation", "Jupiter the Power Patron of Destruction", "Junora the Power Patron of Tuning" +function s.cannotactcon(e) + local tp=e:GetHandlerPlayer() + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,53589300),tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,68231287),tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,5914858),tp,LOCATION_ONFIELD,0,1,nil) +end +function s.revealfilter(c,e,tp) + return c:IsSetCard(SET_POWER_PATRON) and not c:IsPublic() + and Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode(),Duel.GetLocationCount(tp,LOCATION_MZONE)>0) +end +function s.thspfilter(c,e,tp,code,mmz_chk) + return c:ListsCode(code) and c:IsMonster() 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 return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil,nil,POS_FACEDOWN) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.thspop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil,nil,POS_FACEDOWN) + if #g==0 or Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)==0 then return end + local code=e:GetLabel() + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) + local sc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,code,mmz_chk):GetFirst() + if not sc then return end + Duel.BreakEffect() + 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,2) + ) +end \ No newline at end of file diff --git a/official/c5208118.lua b/official/c5208118.lua new file mode 100644 index 0000000000..5333678556 --- /dev/null +++ b/official/c5208118.lua @@ -0,0 +1,75 @@ +--動点するP +--Moving Point Pendulum +--scripted by pyrQ +local s,id=GetID() +local COUNTER_T=0x218 +function s.initial_effect(c) + c:EnableCounterPermit(COUNTER_T) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Once per turn, during the Standby Phase: Place 1 T Counter on this card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_COUNTER) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1) + e1:SetOperation(function(e) e:GetHandler():AddCounter(COUNTER_T,1) end) + c:RegisterEffect(e1) + --Once per turn: You can target 1 Pendulum Monster in your Main Monster Zone; move that Pendulum Monster to an unused adjacent Main Monster Zone a number of times equal to the number of T Counters on this card, then if your opponent controls in the targeted monster's column a Fusion and/or Xyz Monster(s) with a Level/Rank equal to or lower than the targeted monster's Pendulum Scale, destroy as many of them as possible, and if you do, inflict damage to your opponent equal to the total ATK the destroyed monsters had on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e) return e:GetHandler():HasCounter(COUNTER_T) end) + e2:SetTarget(s.movetg) + e2:SetOperation(s.moveop) + e2:SetHintTiming(TIMING_STANDBY_PHASE,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +function s.movefilter(c) + return c:IsPendulumMonster() and c:IsFaceup() and c:CheckAdjacent() +end +function s.movetg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingTarget(s.movefilter,tp,LOCATION_MMZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.movefilter,tp,LOCATION_MMZONE,0,1,1,nil) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE) + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) +end +function s.desfilter(c,opp,scale) + if not ((c:IsFusionMonster() or c:IsXyzMonster()) and c:IsFaceup() and c:IsControler(opp)) then return false end + if c:HasLevel() then + return c:IsLevelBelow(scale) + elseif c:HasRank() then + return c:IsRankBelow(scale) + end +end +function s.moveop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not (c:IsRelateToEffect(e) and c:HasCounter(COUNTER_T)) then return end + local tc=Duel.GetFirstTarget() + local move_count=c:GetCounter(COUNTER_T) + if tc:IsRelateToEffect(e) and tc:IsPendulumMonster() and tc:IsFaceup() then + for i=1,move_count do + tc:MoveAdjacent() + end + end + local opp=1-tp + local column_g=tc:GetColumnGroup():Match(s.desfilter,nil,opp,tc:GetScale()) + if #column_g==0 then return end + Duel.BreakEffect() + if Duel.Destroy(column_g,REASON_EFFECT)==0 then return end + local total_atk=Duel.GetOperatedGroup():GetSum(Card.GetPreviousAttackOnField) + if total_atk>0 then + Duel.Damage(opp,total_atk,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c52782439.lua b/official/c52782439.lua new file mode 100644 index 0000000000..039b9bd9e5 --- /dev/null +++ b/official/c52782439.lua @@ -0,0 +1,79 @@ +--特別ダイヤ +--Exceptional Schedule +--scripted by pyrQ +local s,id=GetID() +local TOKEN_SCHEDULE=id+1 +function s.initial_effect(c) + --Add 1 "Special Schedule" or "Urgent Schedule" from your Deck to your hand, then you can Special Summon 1 "Schedule Token" (Machine/EARTH/Level 10/ATK 3000/DEF 3000) to your opponent's field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Send 1 card you control to the GY, and if you do, Special Summon that Level 10 Machine monster in your GY or banishment + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={97520701,25274141,TOKEN_SCHEDULE} --"Special Schedule, "Urgent Schedule" +function s.thfilter(c) + return c:IsCode(97520701,25274141) and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local 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) + Duel.ShuffleHand(tp) + if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SCHEDULE,0,TYPES_TOKEN,3000,3000,10,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP,1-tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + local token=Duel.CreateToken(tp,TOKEN_SCHEDULE) + Duel.BreakEffect() + Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP) + end + end +end +function s.tgfilter(c,tp) + return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGrave() +end +function s.spfilter(c,e,tp) + return c:IsLevel(10) and c:IsRace(RACE_MACHINE) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) + 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_TOGRAVE,nil,1,tp,LOCATION_ONFIELD) + 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() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + if Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) and tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c53904087.lua b/official/c53904087.lua new file mode 100644 index 0000000000..f2b9af54e3 --- /dev/null +++ b/official/c53904087.lua @@ -0,0 +1,88 @@ +--神書の使いラハムゥ +--Lahamu the Messenger of Sacred Scripture +--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) + --Once while this Link Summoned card is face-up on the field, you can Normal Summon 1 Level 5 or higher monster without Tributing + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) + e1:SetCode(EFFECT_SUMMON_PROC) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_HAND,0) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.ntcon) + e1:SetTarget(aux.FieldSummonProcTg(function(e,c) return c:IsLevelAbove(5) end)) + c:RegisterEffect(e1) + --During the Main Phase, you can (Quick Effect): Immediately after this effect resolves, Normal Summon 1 Level 5 or higher DARK monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(s.nstg) + e2:SetOperation(s.nsop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) + --During your End Phase: You can reveal any number of monsters in your hand and place them on the bottom of the Deck in any order, then draw the same number of cards + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e3:SetTarget(s.drtg) + e3:SetOperation(s.drop) + c:RegisterEffect(e3) +end +function s.ntcon(e,c,minc) + if c==nil then return true end + return e:GetHandler():IsLinkSummoned() and minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 +end +function s.nsfilter(c) + return c:IsSummonable(true,nil) and c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_DARK) +end +function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) +end +function s.nsop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() + if sc then + Duel.Summon(tp,sc,true,nil) + end +end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToDeck),tp,LOCATION_HAND,0,1,nil) + and Duel.IsPlayerCanDraw(tp) end + Duel.SetTargetPlayer(tp) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local target_player=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) + local max_count=Duel.GetMatchingGroupCount(aux.AND(Card.IsMonster,Card.IsAbleToDeck),target_player,LOCATION_HAND,0,nil) + if max_count==0 then return end + Duel.Hint(HINT_SELECTMSG,target_player,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(target_player,aux.AND(Card.IsMonster,Card.IsAbleToDeck),target_player,LOCATION_HAND,0,1,max_count,nil) + if #g>0 then + Duel.ConfirmCards(1-target_player,g) + local draw_count=Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) + if draw_count>0 then + if draw_count>1 then Duel.SortDeckbottom(target_player,target_player,draw_count) end + Duel.BreakEffect() + Duel.Draw(target_player,draw_count,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c56651978.lua b/official/c56651978.lua new file mode 100644 index 0000000000..4c3f45dcfb --- /dev/null +++ b/official/c56651978.lua @@ -0,0 +1,97 @@ +--耀聖の風詩レギナ +--Elvennotes Regina +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --(Quick Effect): You can send 1 other "Elvennotes" card from your hand or face-up field to the GY; Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --If this card is Normal or Special Summoned to the center Main Monster Zone: You can Special Summon 1 "Elvennotes" monster from your Deck, except "Elvennotes Regina" + 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_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetCondition(function(e) return e:GetHandler():IsSequence(2) end) + e2a:SetTarget(s.sptg) + e2a:SetOperation(s.spop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --If this card is sent to the GY as Synchro Material: You can add this card to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_BE_MATERIAL) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_names={id} +s.listed_series={SET_ELVENNOTES} +function s.selfspcostfilter(c,tp) + return c:IsSetCard(SET_ELVENNOTES) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 + and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) +end +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,c,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,c,tp) + 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 c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ELVENNOTES) 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_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.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoHand(c,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c56725612.lua b/official/c56725612.lua new file mode 100644 index 0000000000..c8481f8a3d --- /dev/null +++ b/official/c56725612.lua @@ -0,0 +1,80 @@ +--妖精伝姫の舞踏会 +--Fairy Tail Ball +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can add 1 "Fairy Tail" monster or "Fairy Tail Tales" from your Deck or banishment to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Your "Fairy Tail" monsters can attack directly + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_DIRECT_ATTACK) + e2:SetRange(LOCATION_FZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_FAIRY_TAIL)) + c:RegisterEffect(e2) + --Negate the effects of 1 Effect Monster your opponent controls, also its name becomes "Fairy Prince" + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DISABLE) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetRange(LOCATION_FZONE) + e3:SetCountLimit(1) + e3:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) + e3:SetTarget(s.distg) + e3:SetOperation(s.disop) + c:RegisterEffect(e3) +end +s.listed_series={SET_FAIRY_TAIL} +s.listed_names={91957038,CARD_FAIRY_PRINCE} --"Fairy Tail Tales" +function s.thfilter(c) + return ((c:IsSetCard(SET_FAIRY_TAIL) and c:IsMonster()) or c:IsCode(91957038)) and c:IsAbleToHand() + and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end +function s.disfilter(c) + return c:IsType(TYPE_EFFECT) and c:IsFaceup() and (c:IsNegatableMonster() or not c:IsCode(CARD_FAIRY_PRINCE)) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,0,LOCATION_MZONE,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local c=e:GetHandler() + --Negate its effects + tc:NegateEffects(c) + --Its name becomes "Fairy Prince" + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(CARD_FAIRY_PRINCE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c56838842.lua b/official/c56838842.lua new file mode 100644 index 0000000000..e092ccd86d --- /dev/null +++ b/official/c56838842.lua @@ -0,0 +1,93 @@ +--デモン・ピース・ゴーレム +--Fiend Piece Golem +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Decrease this card's Level by up to 2 + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_LVCHANGE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsLevelAbove(2) end end) + e2:SetOperation(s.lvchangeop) + c:RegisterEffect(e2) + --Special Summon 1 Level 4 or lower Fiend monster from your GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_BE_MATERIAL) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.gyspcon) + e3:SetTarget(s.gysptg) + e3:SetOperation(s.gyspop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +function s.selfspconfilter(c) + return c:IsRace(RACE_FIEND) and c:IsType(TYPE_TUNER) and c:IsFaceup() +end +function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.selfspconfilter,tp,LOCATION_MZONE,0,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) 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.lvchangeop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsLevelAbove(2) then + local b1=c:IsLevelAbove(2) + local b2=c:IsLevelAbove(3) + local lv=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + --Decrease its Level by up to 2 + c:UpdateLevel(-lv,RESET_EVENT|RESETS_STANDARD_DISABLE) + end +end +function s.gyspcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local sync=c:GetReasonCard() + return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and (sync:IsCode(CARD_RED_DRAGON_ARCHFIEND) or sync:ListsCode(CARD_RED_DRAGON_ARCHFIEND)) +end +function s.gyspfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.gyspfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) 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) +end +function s.gyspop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end +end \ No newline at end of file diff --git a/official/c57847269.lua b/official/c57847269.lua new file mode 100644 index 0000000000..47726357ba --- /dev/null +++ b/official/c57847269.lua @@ -0,0 +1,106 @@ +--道化の一座『開演』 +--Clown Crew "Matinee" +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --During your Main Phase: You can Special Summon 1 "Clown Crew" monster from your Deck or Extra Deck, ignoring its Summoning conditions, also you cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --During the End Phase: You can draw cards equal to the number of monster card types (Ritual, Fusion, Synchro, Xyz, Pendulum, Link) Tributed this turn, then you can Set 1 Spell/Trap from your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DRAW+CATEGORY_SET) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) + c:RegisterEffect(e2) + --Keep track of how many monster card types (Ritual, Fusion, Synchro, Xyz, Pendulum, Link) were Tributed each turn + 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_CLOWN_CREW} +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + local g=eg:Filter(Card.IsType,nil,TYPE_RITUAL|TYPE_PENDULUM|TYPE_EXTRA) + for rc in g:Iter() do + local card_type=(rc:GetOriginalType()&(TYPE_RITUAL|TYPE_PENDULUM|TYPE_EXTRA)) + local label=Duel.GetFlagEffectLabel(0,id) + if not label or card_type&label==0 then + local new_label=label and (card_type|label) or card_type + Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) + Duel.SetFlagEffectLabel(0,id,new_label) + end + end +end +function s.spfilter(c,e,tp,mmz_chk) + if not (c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end + if c:IsLocation(LOCATION_DECK) then + return mmz_chk + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) + end + --You cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next 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_ACTIVATE) + e1:SetTargetRange(1,0) + e1:SetValue(s.aclimit) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) +end +function s.aclimit(e,re,tp) + local rc=re:GetHandler() + return re:IsMonsterEffect() and rc:IsOnField() and rc:IsSummonLocation(LOCATION_DECK|LOCATION_EXTRA) +end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + local ct=Duel.GetFlagEffect(0,id) + if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) +end +function s.drop(e,tp,eg,ep,ev,re,r,rp) + if Duel.Draw(tp,Duel.GetFlagEffect(0,id),REASON_EFFECT)>0 then + Duel.ShuffleHand(tp) + if Duel.IsExistingMatchingCard(Card.IsSSetable,tp,LOCATION_HAND,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,Card.IsSSetable,tp,LOCATION_HAND,0,1,1,nil) + if #g>0 then + Duel.BreakEffect() + Duel.SSet(tp,g,tp,false) + end + end + end +end \ No newline at end of file diff --git a/official/c6083904.lua b/official/c6083904.lua new file mode 100644 index 0000000000..e5fa4b54f3 --- /dev/null +++ b/official/c6083904.lua @@ -0,0 +1,89 @@ +--妖光のディアーブロッケン +--Diabrocken of the Ghost Light +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --(Quick Effect): You can banish 1 FIRE monster from your face-up field or GY; Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --If this card is Special Summoned: You can target 1 face-up card on the field; negate its effects until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --If this card is sent to the GY as Link Material: You can Set 1 Quick-Play Spell or Normal Trap from your GY that was sent there this turn + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_SET) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_BE_MATERIAL) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK end) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +function s.spcostfilter(c,tp) + return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsFaceup() and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) + end +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsNegatable() end + if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp,chk) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) + end +end +function s.setfilter(c,turn_count) + return (c:IsQuickPlaySpell() or c:IsNormalTrap()) and c:GetTurnID()==turn_count and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_GRAVE,0,1,nil,Duel.GetTurnCount()) end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil,Duel.GetTurnCount()) + if #g>0 then + Duel.SSet(tp,g) + end +end \ No newline at end of file diff --git a/official/c6325660.lua b/official/c6325660.lua new file mode 100644 index 0000000000..0838fbda1c --- /dev/null +++ b/official/c6325660.lua @@ -0,0 +1,68 @@ +--霆王の閃光 +--Dominus Spark +local s,id=GetID() +function s.initial_effect(c) + --During the turn in which your opponent has activated a monster effect in the hand or GY, you can activate this card from your hand + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_TRAP_ACT_IN_HAND) + e0:SetCondition(function(e) return Duel.GetCustomActivityCount(id,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 end) + c:RegisterEffect(e0) + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) + --Target 1 monster your opponent controls; banish it, then if you have no Traps in your GY, your opponent can Special Summon 1 monster from their hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +function s.chainfilter(re,tp,cid) + return not (re:IsMonsterEffect() and re:GetActivateLocation()&(LOCATION_HAND|LOCATION_GRAVE)>0) +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:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end + local act_from_hand_chk=e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) and 1 or 0 + e:SetLabel(act_from_hand_chk) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_HAND) +end +function s.spfilter(c,e,opp) + return c:IsCanBeSpecialSummoned(e,0,opp,false,false) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local opp=1-tp + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 + and not Duel.IsExistingMatchingCard(Card.IsTrap,tp,LOCATION_GRAVE,0,1,nil) + and Duel.GetLocationCount(opp,LOCATION_MZONE,opp)>0 + and Duel.IsExistingMatchingCard(s.spfilter,opp,LOCATION_HAND,0,1,nil,e,opp) + and Duel.SelectYesNo(opp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(opp,s.spfilter,opp,LOCATION_HAND,0,1,1,nil,e,opp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,opp,opp,false,false,POS_FACEUP) + end + end + if e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()==1 then + --If you activated this card from your hand, you cannot activate the effects of EARTH, WATER, FIRE, and WIND monsters for the rest of this Duel + 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_ACTIVATE) + e1:SetTargetRange(1,0) + e1:SetValue(function(e,re) return re:IsMonsterEffect() and re:GetHandler():IsAttribute(ATTRIBUTE_EARTH|ATTRIBUTE_WATER|ATTRIBUTE_FIRE|ATTRIBUTE_WIND) end) + Duel.RegisterEffect(e1,tp) + end +end \ No newline at end of file diff --git a/official/c6361316.lua b/official/c6361316.lua new file mode 100644 index 0000000000..4606a44aef --- /dev/null +++ b/official/c6361316.lua @@ -0,0 +1,89 @@ +--WAKE CUP! クロ +--WAKE CUP! Kuro +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --FLIP: You can target 1 other face-up monster on the field; change it to face-down Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_POSITION+CATEGORY_SET) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.facedowntg) + e1:SetOperation(s.facedownop) + c:RegisterEffect(e1) + --You can reveal this card in your hand; add 1 WIND Flip monster from your Deck to your hand, except "WAKE CUP! Kuro", then discard 1 card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfReveal) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --(Quick Effect): You can target 1 face-down Defense Position monster on the field; change it to face-up Defense Position + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_POSITION) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.faceuptg) + e3:SetOperation(s.faceupop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +s.listed_names={id} +function s.facedowntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanTurnSet() and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,POS_FACEDOWN_DEFENSE) +end +function s.facedownop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsMonster() then + Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) + end +end +function s.thfilter(c) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_FLIP) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) + end +end +function s.faceuptgfilter(c) + return c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsCanChangePosition() +end +function s.faceuptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.faceuptgfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.faceuptgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local tc=Duel.SelectTarget(tp,s.faceuptgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,tc,1,tp,POS_FACEUP_DEFENSE) +end +function s.faceupop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsMonster() then + Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) + end +end \ No newline at end of file diff --git a/official/c64626565.lua b/official/c64626565.lua new file mode 100644 index 0000000000..9b1d9b83b8 --- /dev/null +++ b/official/c64626565.lua @@ -0,0 +1,71 @@ +--黒智天至イリスフィール +--Cherubidamn Irisfiel +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 8 monsters, OR 1 Xyz Monster you control that has not activated its effect in the Monster Zone this turn + Xyz.AddProcedure(c,nil,8,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop) + --Keep track of Xyz Monsters that have activated their effect in the Monster Zone each turn + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_CHAIN_SOLVED) + ge1:SetOperation(s.checkop) + Duel.RegisterEffect(ge1,0) + end) + --If this card is Xyz Summoned: You can activate this effect; this turn, Xyz Monsters you control gain ATK equal to their own Rank x 100 during the Battle Phase only + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_ATKCHANGE) + 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:SetOperation(s.atkop) + c:RegisterEffect(e1) + --If this card would be destroyed by battle or card effect, you can detach 1 material from a monster you control instead + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_DESTROY_REPLACE) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.reptg) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.ovfilter(c,tp,xyzc) + return c:IsXyzMonster() and not c:HasFlagEffect(id) and c:IsFaceup() +end +function s.xyzop(e,tp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.checkop(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if re:IsMonsterEffect() and rc:IsXyzMonster() and rc:IsRelateToEffect(re) + and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE then + rc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + end +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) + --This turn, Xyz Monsters you control gain ATK equal to their own Rank x 100 during the Battle Phase only + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetTarget(function(e,c) return c:IsXyzMonster() end) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetCondition(function() return Duel.IsBattlePhase() end) + e1:SetValue(function(e,c) return c:GetRank()*100 end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) + and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) end + return Duel.SelectEffectYesNo(tp,c,96) and Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT)>0 +end \ No newline at end of file diff --git a/official/c6547248.lua b/official/c6547248.lua new file mode 100644 index 0000000000..33823907f9 --- /dev/null +++ b/official/c6547248.lua @@ -0,0 +1,111 @@ +--道化の一座『新加入』 +--Clown Crew "New Face" +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --During the Standby Phase: You can shuffle 3 "Clown Crew" cards from your GY and/or banishment into the Deck, then draw 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function() return Duel.IsStandbyPhase() end) + e1:SetTarget(s.tdtg) + e1:SetOperation(s.tdop) + e1:SetHintTiming(TIMING_STANDBY_PHASE) + c:RegisterEffect(e1) + --If you Tribute Summon a monster: You can target other Spells/Traps on the field, up to the number of monsters Tributed for its Tribute Summon; destroy them + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.descon) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) + --If this card is sent to the GY, except from the field: You can place this card face-up on your field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e) return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e3:SetTarget(s.pltg) + e3:SetOperation(s.plop) + c:RegisterEffect(e3) +end +s.listed_series={SET_CLOWN_CREW} +function s.tdfilter(c) + return c:IsSetCard(SET_CLOWN_CREW) and c:IsFaceup() and c:IsAbleToDeck() +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp) + and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,3,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + if not Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,3,nil) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,3,3,nil) + if #g==0 then return end + Duel.HintSelection(g) + if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then + if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end + if Duel.IsPlayerCanDraw(tp) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end + end +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local ec=eg:GetFirst() + if not (ec:IsSummonPlayer(tp) and ec:IsTributeSummoned()) then return false end + local mat_count=ec:GetMaterialCount() + if mat_count>e:GetLabel() then + e:SetLabel(mat_count) + end + return mat_count>0 +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() and chkc~=c end + if chk==0 then + local mat_count=e:GetLabel() + e:SetLabel(0) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1,mat_count) + return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) + end + local max_count=c:GetFlagEffectLabel(id) + c:ResetFlagEffect(id) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,max_count,c) + 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 +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/official/c65848113.lua b/official/c65848113.lua new file mode 100644 index 0000000000..a798524ad4 --- /dev/null +++ b/official/c65848113.lua @@ -0,0 +1,83 @@ +--終刻竜機ⅩⅢ-グラフレイオ +--DoomZ XIII Over - Graflario +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 5 monsters, OR 1 "DoomZ" Xyz Monster you control + Xyz.AddProcedure(c,nil,5,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop) + --You can detach 1 material from this card; add 1 "DoomZ" Spell/Trap from your Deck to your hand, then you can destroy 1 card on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.DetachFromSelf(1)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If this card is destroyed by card effect: You can Special Summon 1 non-Xyz "DoomZ" monster from your Deck or GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_EFFECT) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_DOOMZ} +function s.ovfilter(c,tp,xyzc) + return c:IsSetCard(SET_DOOMZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup() +end +function s.xyzop(e,tp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.thfilter(c) + return c:IsSetCard(SET_DOOMZ) 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) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + if Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #dg>0 then + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end + end +end +function s.spfilter(c,e,tp) + return not c:IsXyzMonster() and c:IsSetCard(SET_DOOMZ) 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|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,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/c65961304.lua b/official/c65961304.lua new file mode 100644 index 0000000000..0a1872ca1b --- /dev/null +++ b/official/c65961304.lua @@ -0,0 +1,86 @@ +--キラーチューン B2B +--Kewl Tune Back 2 Back +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ Synchro Monsters + Synchro.AddProcedure(c,nil,1,1,aux.FilterBoolFunctionEx(Card.IsType,TYPE_SYNCHRO),1,99) + --The Levels of monsters your opponent controls are increased by 2 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetValue(2) + c:RegisterEffect(e1) + --Your Tuners can make a second attack during each Battle Phase + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_EXTRA_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_TUNER)) + e2:SetValue(1) + c:RegisterEffect(e2) + --When your opponent activates a monster effect (Quick Effect): You can target 1 Tuner in your GY or banishment, except a Level 10 monster; either add it to your hand or Special Summon it, then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(2,id) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() end) + e3:SetTarget(s.thsptg) + e3:SetOperation(s.thspop) + c:RegisterEffect(e3) + --Multiple tuners + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_SINGLE) + e4:SetCode(EFFECT_MATERIAL_CHECK) + e4:SetValue(s.valcheck) + c:RegisterEffect(e4) +end +function s.thspfilter(c,e,tp,mmz_chk) + return c:IsType(TYPE_TUNER) and not c:IsLevel(10) and c:IsFaceup() + 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,chkc) + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.thspfilter(chkc,e,tp,mmz_chk) end + if chk==0 then return Duel.IsExistingTarget(s.thspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp,mmz_chk) end + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) + local g=Duel.SelectTarget(tp,s.thspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp,mmz_chk) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + if g:GetFirst():IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,tp,0) + end +end +function s.thspop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not tc:IsRelateToEffect(e) or not aux.ToHandOrElse(tc,tp, + function() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, + function() return Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 end, + aux.Stringid(id,2) + ) then return end + local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,1,1,nil) + Duel.SynchroSummon(tp,sg:GetFirst()) + end +end +function s.valcheck(e,c) + local g=c:GetMaterial() + if g:IsExists(function(c) return c:IsType(TYPE_TUNER) or c:IsHasEffect(EFFECT_CAN_BE_TUNER) end,2,nil) then + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_MULTIPLE_TUNERS) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)|RESET_PHASE|PHASE_END) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c66787942.lua b/official/c66787942.lua new file mode 100644 index 0000000000..5b05d48756 --- /dev/null +++ b/official/c66787942.lua @@ -0,0 +1,67 @@ +--捕食植物バアル・テア +--Predaplant Baalthea +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --Special Summon 1 "Predaplant" or "Starving Venom" monster from your face-up Extra Deck or 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_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) + --Fusion Summon 1 Fusion Monster, using monsters from your hand or field as material + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsControler,1,nil,1-tp) end) + e2:SetCost(s.fuscost) + e2:SetTarget(Fusion.SummonEffTG()) + e2:SetOperation(Fusion.SummonEffOP()) + c:RegisterEffect(e2) +end +s.listed_series={SET_PREDAPLANT,SET_STARVING_VENOM} +s.listed_names={CARD_POLYMERIZATION} +function s.spfilter(c,e,tp) + if not (c:IsSetCard({SET_PREDAPLANT,SET_STARVING_VENOM}) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if c:IsLocation(LOCATION_GRAVE) then + return Duel.GetMZoneCount(tp)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_EXTRA|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.fuscostfilter(c) + return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToRemoveAsCost() +end +function s.fuscost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.fuscostfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.fuscostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + g:AddCard(c) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end diff --git a/official/c67809530.lua b/official/c67809530.lua new file mode 100644 index 0000000000..126c39b0b5 --- /dev/null +++ b/official/c67809530.lua @@ -0,0 +1,83 @@ +--紅蓮の王者 +--The Crimson King +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner DARK monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsAttribute,ATTRIBUTE_DARK),1,99) + --Add 1 card that mentions "Red Dragon Archfiend" 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) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Special Summon 1 "Red Dragon Archfiend" from your Extra Deck (this is treated as a Synchro Summon) + 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_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 and re:IsMonsterEffect() end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +function s.thfilter(c) + return c:ListsCode(CARD_RED_DRAGON_ARCHFIEND) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.spfilter(c,e,tp,mc) + if not c:IsCode(CARD_RED_DRAGON_ARCHFIEND) then return false end + local forcedg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,c,nil,REASON_SYNCHRO) + return #forcedg==0 and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) 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 sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if not sc then return end + sc:SetMaterial(nil) + if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) then + sc:CompleteProcedure() + --Its ATK becomes doubled + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK) + e1:SetValue(sc:GetAttack()*2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + --Also it cannot be destroyed by your opponent's card effects + local e2=e1:Clone() + e2:SetDescription(3060) + e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2:SetValue(aux.indoval) + sc:RegisterEffect(e2) + end +end \ No newline at end of file diff --git a/official/c70058649.lua b/official/c70058649.lua new file mode 100644 index 0000000000..d0b77edd4f --- /dev/null +++ b/official/c70058649.lua @@ -0,0 +1,153 @@ +--道化の一座『怪演』 +--Clown Crew "Soiree" +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects (but you can only use each of these effects of "Clown Crew "Soiree"" once per turn) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --During the Main Phase: You can banish this card from your GY; immediately after this effect resolves, Tribute Summon 1 "Clown Crew" monster face-up + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.tribsumtg) + e2:SetOperation(s.tribsumop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +s.listed_series={SET_CLOWN_CREW} +function s.spfilter(c,e,tp,mmz_chk) + if not (c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end + if c:IsLocation(LOCATION_DECK) then + return mmz_chk + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + end +end +function s.thfilter(c) + return c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and c:IsAbleToHand() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) + local b2=not Duel.HasFlagEffect(tp,id+1) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then return b1 or b2 end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local cost_skip=e:GetLabel()~=-100 + local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) + local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+1)) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then e:SetLabel(0) return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + if not cost_skip then Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) + elseif op==2 then + e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + if not cost_skip then Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + end +end +function s.pendlinkfilter(c) + return (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()) or c:IsLinkMonster() +end +function s.rescon(mmz_ct,linkmz_ct) + return function(sg,e,tp,mg) + return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=mmz_ct + and sg:FilterCount(s.pendlinkfilter,nil)<=linkmz_ct + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + if e:IsHasType(EFFECT_TYPE_ACTIVATE) then + --You cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next turn after this card resolves + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetTargetRange(1,0) + e1:SetValue(s.aclimit) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) + end + local op=e:GetLabel() + if op==1 then + --● Special Summon up to 2 "Clown Crew" monsters from your Deck and/or Extra Deck, ignoring their Summoning conditions + local mmz_ct=Duel.GetLocationCount(tp,LOCATION_MZONE) + local emz_ct=Duel.GetLocationCountFromEx(tp,tp,nil,nil,ZONES_EMZ) + local linkmz_ct=Duel.GetLocationCountFromEx(tp,tp) + local ft=math.min(mmz_ct+emz_ct,2) + if ft<=0 then return end + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp,mmz_ct>0) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) + if #sg==0 then return end + local fup,fdown=sg:Split(s.pendlinkfilter,nil) + local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) + local priority_0,priority_1 + if linkmz_ct0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end +function s.aclimit(e,re,tp) + local rc=re:GetHandler() + return re:IsMonsterEffect() and rc:IsOnField() and rc:IsSummonLocation(LOCATION_DECK|LOCATION_EXTRA) +end +function s.tribsumfilter(c) + return c:IsSetCard(SET_CLOWN_CREW) and c:IsSummonable(true,nil,1) +end +function s.tribsumtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tribsumfilter,tp,LOCATION_HAND,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.tribsumop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.tribsumfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() + if sc then + Duel.Summon(tp,sc,true,nil,1) + end +end \ No newline at end of file diff --git a/official/c70088809.lua b/official/c70088809.lua new file mode 100644 index 0000000000..575e710188 --- /dev/null +++ b/official/c70088809.lua @@ -0,0 +1,106 @@ +--調和ノ天救竜 +--Fidraulis Harmonia +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When your opponent activates a monster effect on the field (Quick Effect): You can reveal this card in your hand and up to 5 Synchro Monsters in your Extra Deck; apply these effects in sequence based on the total number revealed, also you cannot activate the effects of monsters Special Summoned from the Extra Deck until the end of your next turn, except Synchro Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(s.effcon) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +function s.effcon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsMonsterEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE +end +function s.revealfilter(c) + return c:IsSynchroMonster() and not c:IsPublic() +end +function s.rescon(sg,e,tp,mg) + local b1=#sg==1 + local b2=#sg==3 and sg:IsExists(Card.IsAbleToGrave,1,nil) + local b3=#sg==5 and sg:IsExists(Card.IsAbleToGrave,1,nil) and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 + return b1 or b2 or b3 +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(s.revealfilter,tp,LOCATION_EXTRA,0,nil) + if chk==0 then return not c:IsPublic() and #g>0 end + local max_reveal_count=math.min(#g,5) + local sg=aux.SelectUnselectGroup(g,e,tp,1,max_reveal_count,s.rescon,1,tp,HINTMSG_CONFIRM,s.rescon) + Duel.ConfirmCards(1-tp,c) + Duel.ConfirmCards(1-tp,sg) + Duel.ShuffleExtra(tp) + e:SetLabel(#sg+1) + e:SetLabelObject(sg) + for sc in sg:Iter() do + sc:CreateEffectRelation(e) + end +end +function s.efftg(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 + local reveal_count=e:GetLabel() + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + if reveal_count>=4 then + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) + end + if reveal_count==6 then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,0,LOCATION_MZONE),1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local break_chk=false + local reveal_count=e:GetLabel() + if reveal_count>=2 and c:IsRelateToEffect(e) then + --● 2+: Special Summon this card + break_chk=true + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + if reveal_count>=4 then + --● 4+: Send 1 of the revealed Synchro Monsters to the GY + local revealed_synchros=e:GetLabelObject():Match(Card.IsRelateToEffect,nil,e) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=revealed_synchros:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil) + if #g>0 then + if break_chk then Duel.BreakEffect() end + break_chk=true + Duel.SendtoGrave(g,REASON_EFFECT) + end + end + if reveal_count==6 then + --● 6: Destroy 1 monster your opponent controls + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + if break_chk then Duel.BreakEffect() end + Duel.Destroy(g,REASON_EFFECT) + end + end + local reset_count=Duel.IsTurnPlayer(tp) and 2 or 1 + --You cannot activate the effects of monsters Special Summoned from the Extra Deck until the end of your next turn, except Synchro 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_ACTIVATE) + e1:SetTargetRange(1,0) + e1:SetValue(s.aclimit) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) + Duel.RegisterEffect(e1,tp) +end +function s.aclimit(e,re,tp) + local rc=re:GetHandler() + return re:IsMonsterEffect() and rc:IsOnField() and rc:IsSummonLocation(LOCATION_EXTRA) + and not rc:IsSynchroMonster() +end \ No newline at end of file diff --git a/official/c70488851.lua b/official/c70488851.lua new file mode 100644 index 0000000000..2167eff3fa --- /dev/null +++ b/official/c70488851.lua @@ -0,0 +1,164 @@ +--混絶獄神ヴィードリウム +--Vidrium the Power Patron of Chaos Extermination +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + Pendulum.AddProcedure(c) + --Must be Special Summoned (from your face-up Extra Deck or GY) by returning 1 Fusion, 1 Synchro, and 1 Xyz Monster from your face-up field and/or GY to the Extra Deck + c:AddMustBeSpecialSummoned() + 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|LOCATION_GRAVE) + e0:SetCondition(s.selfspcon) + e0:SetTarget(s.selfsptg) + e0:SetOperation(s.selfspop) + c:RegisterEffect(e0) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --If this card is added to your Extra Deck face-up: You can add 1 "Power Patron" card from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_DECK) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --If this card is Special Summoned: Banish (face-down) all cards from the GYs + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,3)) + e3:SetCategory(CATEGORY_REMOVE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetTarget(s.rmtg) + e3:SetOperation(s.rmop) + c:RegisterEffect(e3) + --Unaffected by monster effects, except "Power Patron" monsters + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_SINGLE) + e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e4:SetCode(EFFECT_IMMUNE_EFFECT) + e4:SetRange(LOCATION_MZONE) + e4:SetValue(function(e,te) return te:IsMonsterEffect() and not te:GetOwner():IsSetCard(SET_POWER_PATRON) end) + c:RegisterEffect(e4) +end +s.listed_series={SET_POWER_PATRON} +local TYPES_FSX=TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ +function s.tdfilter(c) + return c:IsType(TYPES_FSX) and c:IsAbleToExtraAsCost() +end +function s.tdrescon(sg,e,tp,mg) + return sg:GetBitwiseOr(Card.GetType)&TYPES_FSX==TYPES_FSX + and (e:GetHandler():IsLocation(LOCATION_GRAVE) and Duel.GetMZoneCount(tp,sg)>0 or Duel.GetLocationCountFromEx(tp,tp,sg,e:GetHandler())>0) +end +function s.selfspcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) + return aux.SelectUnselectGroup(g,e,tp,3,3,s.tdrescon,0) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) + local rg=aux.SelectUnselectGroup(g,e,tp,3,3,s.tdrescon,1,tp,HINTMSG_TODECK,nil,nil,true) + if #rg~=3 then return false end + e:SetLabelObject(rg) + return true +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_POWER_PATRON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local b1=Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,4)}, + {true,aux.Stringid(id,5)}) + e:SetLabel(op) + local c=e:GetHandler() + if op==1 then + e:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) + elseif op==2 then + e:SetCategory(CATEGORY_DESTROY) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local op=e:GetLabel() + if op==1 then + --Destroy this card, and if you do, Special Summon 1 "Power Patron" monster from your hand or GY + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and Duel.GetMZoneCount(tp)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + elseif op==2 then + --Destroy this card, also this turn, "Power Patron" monsters you control whose original Level is 12 gain 5000 ATK + if c:IsRelateToEffect(e) then + Duel.Destroy(c,REASON_EFFECT) + end + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,6)) + --"Power Patron" monsters you control whose original Level is 12 gain 5000 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_POWER_PATRON) and c:IsOriginalLevel(12) end) + e1:SetValue(5000) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end +function s.thcon(e) + local c=e:GetHandler() + return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() +end +function s.thfilter(c) + return c:IsSetCard(SET_POWER_PATRON) 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.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,nil,POS_FACEDOWN) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,nil,POS_FACEDOWN) + if #g>0 then + Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c71275181.lua b/official/c71275181.lua new file mode 100644 index 0000000000..4879939016 --- /dev/null +++ b/official/c71275181.lua @@ -0,0 +1,72 @@ +--2つに1つ +--One of Two +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Reveal 1 monster and 2 Traps from your Deck, your opponent randomly picks 1, you look at the rest and banish 1 Trap, then your opponent chooses 1 of these effects for you to apply + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsMonster,1,nil) and sg:IsExists(Card.IsTrap,2,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(aux.OR(Card.IsMonster,Card.IsTrap),tp,LOCATION_DECK,0,nil) + if chk==0 then return #g>=3 and Duel.IsPlayerCanRemove(tp) and aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if not Duel.IsPlayerCanRemove(tp) then return end + local g=Duel.GetMatchingGroup(aux.OR(Card.IsMonster,Card.IsTrap),tp,LOCATION_DECK,0,nil) + if #g<3 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_CONFIRM) + if #sg==0 then return end + local opp=1-tp + Duel.ConfirmCards(opp,sg) + local picked_card=sg:RandomSelect(opp,1):GetFirst() + sg:RemoveCard(picked_card) + Duel.ConfirmCards(tp,sg) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local banished_card=sg:FilterSelect(tp,aux.AND(Card.IsTrap,Card.IsAbleToRemove),1,1,nil) + if #banished_card==0 or Duel.Remove(banished_card,POS_FACEUP,REASON_EFFECT)==0 then return end + sg:RemoveCard(banished_card) + local op=Duel.SelectEffect(opp, + {true,aux.Stringid(id,1)}, + {true,aux.Stringid(id,2)}) + Duel.BreakEffect() + if op==1 then + --● Show the picked card, and if it is a monster, either add it to your hand or Special Summon it. Otherwise, banish it. Shuffle the remaining card into the Deck + Duel.ConfirmCards(opp,picked_card) + if picked_card:IsMonster() then + aux.ToHandOrElse(picked_card,tp, + function() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and picked_card:IsCanBeSpecialSummoned(e,0,tp,false,false) + end, + function() + Duel.SpecialSummon(picked_card,0,tp,tp,false,false,POS_FACEUP) + end, + aux.Stringid(id,3) + ) + else + Duel.Remove(picked_card,POS_FACEUP,REASON_EFFECT) + end + elseif op==2 then + --● Show the card that was not picked nor banished, and if it is a monster, add it to your hand. Otherwise, banish it. Shuffle the remaining card into the Deck + local other_card=sg:GetFirst() + Duel.ConfirmCards(opp,other_card) + if other_card:IsMonster() then + Duel.SendtoHand(other_card,nil,REASON_EFFECT) + else + Duel.Remove(other_card,POS_FACEUP,REASON_EFFECT) + end + end + Duel.ShuffleDeck(tp) +end \ No newline at end of file diff --git a/official/c71801447.lua b/official/c71801447.lua new file mode 100644 index 0000000000..ffd02c646c --- /dev/null +++ b/official/c71801447.lua @@ -0,0 +1,184 @@ +--糾罪巧-Atilε.SPIA +--Enneacraft - Atil.SPIA +local s,id=GetID() +function s.initial_effect(c) + c:EnableCounterPermit(COUNTER_EC,LOCATION_PZONE) + Pendulum.AddProcedure(c) + --Each time a monster(s) is flipped face-up, place 1 E.C. Counter on this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_FLIP) + e1:SetRange(LOCATION_PZONE) + e1:SetOperation(s.counterop) + c:RegisterEffect(e1) + --Destroy 1 monster your opponent controls with less ATK than this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) + e2:SetRange(LOCATION_PZONE) + e2:SetCountLimit(1) + e2:SetCondition(s.descon) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) + --After this card was flipped face-up, while it is in the Monster Zone, your opponent cannot activate cards or effects in response to the activation of their own cards and effects + local e3a=Effect.CreateEffect(c) + e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e3a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e3a:SetCode(EVENT_FLIP) + e3a:SetOperation(function(e) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) end) + c:RegisterEffect(e3a) + local e3b=Effect.CreateEffect(c) + e3b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3b:SetCode(EVENT_CHAINING) + e3b:SetRange(LOCATION_MZONE) + e3b:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e3b:SetOperation(s.chainlimop) + c:RegisterEffect(e3b) + --When your opponent activates a card or effect as Chain Link 3 or higher (Quick Effect): You can change this face-down card to face-up Defense Position; negate the activations of your opponent's cards and effects activated before this effect in this Chain, and if you do, destroy the negated cards + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e4:SetType(EFFECT_TYPE_QUICK_O) + e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e4:SetCode(EVENT_CHAINING) + e4:SetRange(LOCATION_MZONE) + e4:SetCondition(s.negcon) + e4:SetCost(Cost.SelfChangePosition(POS_FACEUP_DEFENSE)) + e4:SetTarget(s.negtg) + e4:SetOperation(s.negop) + c:RegisterEffect(e4) + --Special Summon 1 monster from your hand in face-down Defense Position + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,3)) + e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SET) + e5:SetType(EFFECT_TYPE_IGNITION) + e5:SetRange(LOCATION_HAND) + e5:SetCost(Cost.AND(Cost.SelfReveal,s.spcost)) + e5:SetTarget(s.sptg) + e5:SetOperation(s.spop) + c:RegisterEffect(e5) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsPosition(POS_FACEDOWN_DEFENSE) end) +end +s.counter_place_list={COUNTER_EC} +s.listed_series={SET_ENNEACRAFT} +function s.counterop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not Duel.IsChainSolving() then + c:AddCounter(COUNTER_EC,1) + else + --Place 1 E.C. Counter on this card 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_PZONE) + e1:SetOperation(function() c:AddCounter(COUNTER_EC,1) 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.descon(e,tp,eg,ep,ev,re,r,rp) + local pc=Duel.GetFirstMatchingCard(nil,tp,LOCATION_PZONE,0,e:GetHandler()) + return pc and pc:IsSetCard(SET_ENNEACRAFT) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local atk=e:GetHandler():GetAttack()-1 + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsAttackBelow(atk) end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAttackBelow,atk),tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAttackBelow,atk),tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end +function s.chainlimop(e,tp,eg,ep,ev,re,r,rp) + if ep==1-tp then + Duel.SetChainLimit(function(e,rp,tp) return tp==rp end) + end +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + if not (ep==1-tp and Duel.GetCurrentChain(true)>=3) then return false end + for i=1,ev do + local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) + if te and tgp==1-tp and Duel.IsChainNegatable(i) then + return true + end + end + return false +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local ng=Group.CreateGroup() + local dg=Group.CreateGroup() + for i=1,ev do + local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) + if te and tgp==1-tp and Duel.IsChainNegatable(i) then + local tc=te:GetHandler() + ng:AddCard(tc) + if tc:IsDestructable() and tc:IsRelateToEffect(te) then + dg:AddCard(tc) + end + end + end + Duel.SetTargetCard(dg) + Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,#ng,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,#dg,tp,0) +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + local negate_chk=false + local dg=Group.CreateGroup() + for i=1,ev do + local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) + if te and tgp==1-tp and Duel.NegateActivation(i) then + negate_chk=true + local tc=te:GetHandler() + if tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) then + tc:CancelToGrave() + dg:AddCard(tc) + end + end + end + if negate_chk then + Duel.Destroy(dg,REASON_EFFECT) + end +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end + --You cannot Special Summon the turn you activate this effect, except in face-down Defense Position + 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_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_FORCE_SPSUMMON_POSITION) + e1:SetTargetRange(1,0) + e1:SetValue(POS_FACEDOWN_DEFENSE) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,nil,e,0,tp,false,false,POS_FACEDOWN_DEFENSE) 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,Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,1,nil,e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) + end +end \ No newline at end of file diff --git a/official/c78021082.lua b/official/c78021082.lua new file mode 100644 index 0000000000..775975c06f --- /dev/null +++ b/official/c78021082.lua @@ -0,0 +1,95 @@ +--妖精伝姫を紡ぐ者 +--Weaver of Fairy Tail Tales +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Fairy Tail" monster + 1 Spellcaster monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FAIRY_TAIL),aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) + --Special Summon 1 "Fairy Tail" monster from your Deck or banishment + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate the effects of 1 Effect Monster your opponent controls, also its name becomes "Fairy Prince" + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_DISABLE) + e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetRange(LOCATION_MZONE) + e2a:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2a:SetCondition(s.discon) + e2a:SetTarget(s.distg) + e2a:SetOperation(s.disop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --Every "Fairy Prince" on the field becomes Spellcaster + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetCode(EFFECT_CHANGE_RACE) + e3:SetRange(LOCATION_MZONE) + e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e3:SetTarget(function(e,c) return c:IsCode(CARD_FAIRY_PRINCE) end) + e3:SetValue(RACE_SPELLCASTER) + c:RegisterEffect(e3) +end +s.listed_series={SET_FAIRY_TAIL} +s.listed_names={CARD_FAIRY_PRINCE} +s.material_setcode={SET_FAIRY_TAIL} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_FAIRY_TAIL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) +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|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|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_DECK|LOCATION_REMOVED,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.disconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsAttributeExcept(ATTRIBUTE_EARTH) and c:IsSetCard(SET_FAIRY_TAIL) and c:IsFaceup() +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.disconfilter,1,nil,tp) +end +function s.disfilter(c) + return c:IsType(TYPE_EFFECT) and c:IsFaceup() and (c:IsNegatableMonster() or not c:IsCode(CARD_FAIRY_PRINCE)) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local c=e:GetHandler() + --Negate its effects + tc:NegateEffects(c) + --Its name becomes "Fairy Prince" + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(CARD_FAIRY_PRINCE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end diff --git a/official/c78114463.lua b/official/c78114463.lua new file mode 100644 index 0000000000..511b752429 --- /dev/null +++ b/official/c78114463.lua @@ -0,0 +1,98 @@ +--神の密告 +--Solemn Report +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can activate this card the turn it was Set, by revealing 1 other Set Trap you control + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + 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(aux.AND(Card.IsFacedown,Card.IsTrap),e:GetHandlerPlayer(),LOCATION_SZONE,0,1,e:GetHandler()) end) + c:RegisterEffect(e0) + --When a Spell/Trap Card is activated: Activate 1 of these effects; + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end) + e1:SetCost(Cost.AND(s.revealcost,s.paylpcost)) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetLabelObject(e0) + c:RegisterEffect(e1) +end +function s.revealcost(e,tp,eg,ep,ev,re,r,rp,chk) + local label_obj=e:GetLabelObject() + if chk==0 then label_obj:SetLabel(0) return true end + if label_obj:GetLabel()>0 then + label_obj:SetLabel(0) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsFacedown,Card.IsTrap),tp,LOCATION_SZONE,0,1,1,e:GetHandler()) + Duel.ConfirmCards(1-tp,g) + end +end +function s.banish_activation_chk(e,tp) + local re=Duel.GetChainInfo(Duel.GetCurrentChain(),CHAININFO_TRIGGERING_EFFECT) + local rc=re:GetHandler() + return rc:IsAbleToRemove(tp) or (not rc:IsRelateToEffect(re) and Duel.IsPlayerCanRemove(tp)) +end +s.paylpcost=Cost.Choice( + {Cost.PayLP(1500),aux.Stringid(id,2),aux.TRUE}, + {Cost.PayLP(3000),aux.Stringid(id,3),s.banish_activation_chk} +) +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local op=e:GetLabel() + local rc=re:GetHandler() + local relation=rc:IsRelateToEffect(re) + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + if op==1 then + e:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + if rc:IsDestructable() and relation then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + end + elseif op==2 then + e:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) + 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 +end +function s.banfilter(c,code,opp) + return c:IsOriginalCodeRule(code) and c:IsAbleToRemove(opp) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + local rc=re:GetHandler() + local code=rc:GetOriginalCodeRule() + if op==1 then + --● Pay 1500 LP; negate the activation, and if you do, destroy that card, and if you do that, for the rest of this turn, neither player can activate cards, or the effects of cards, with its same original name + if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then + --For the rest of this turn, neither player can activate cards, or the effects of cards, with its same original name + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetTargetRange(1,1) + e1:SetValue(function(e,re,tp) return re:GetHandler():IsOriginalCodeRule(code) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end + elseif op==2 then + --● Pay 3000 LP; negate the activation, and if you do, banish that card, then your opponent banishes all cards with its same original name from their hand and Deck + if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)>0 then + local opp=1-tp + local g=Duel.GetMatchingGroup(s.banfilter,tp,0,LOCATION_HAND|LOCATION_DECK,nil,code,opp) + if #g>0 then + Duel.BreakEffect() + Duel.Remove(g,POS_FACEUP,REASON_EFFECT,nil,opp) + end + end + end +end \ No newline at end of file diff --git a/official/c78744660.lua b/official/c78744660.lua new file mode 100644 index 0000000000..12fad1219d --- /dev/null +++ b/official/c78744660.lua @@ -0,0 +1,79 @@ +--デス・レジーナ・デーモン +--Doom Regina Archfiend +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + Pendulum.AddProcedure(c) + c:AddMustBeRitualSummoned() + --You can target 1 "Archfiend" Spell/Trap in your GY or banishment; destroy this card, and if you do, add the targeted card to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If this card is Ritual Summoned: You can destroy as many Spells/Traps your opponent controls as possible, then if this card is in the Extra Monster Zone, you can banish all Spells and Traps from your opponent's GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) + 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) return e:GetHandler():IsRitualSummoned() end) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) + --Unaffected by other monsters' effects while in the Extra Monster Zone + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_IMMUNE_EFFECT) + e3:SetRange(LOCATION_EMZONE) + e3:SetValue(function(e,te) return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() end) + c:RegisterEffect(e3) +end +s.listed_series={SET_ARCHFIEND} +s.listed_names={63679166} --"Throne of Archfiends" +function s.thfilter(c) + return c:IsSetCard(SET_ARCHFIEND) and c:IsSpellTrap() and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + 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) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_REMOVED) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and c:IsInExtraMZone() + and Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,Card.IsAbleToRemove),tp,0,LOCATION_GRAVE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + local rg=Duel.GetMatchingGroup(aux.AND(Card.IsSpellTrap,Card.IsAbleToRemove),tp,0,LOCATION_GRAVE,nil) + if #rg>0 then + Duel.BreakEffect() + Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c79936051.lua b/official/c79936051.lua new file mode 100644 index 0000000000..8cff5ab402 --- /dev/null +++ b/official/c79936051.lua @@ -0,0 +1,78 @@ +--ノーザンクロスファイア +--Northern Cross Fire +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If the total Levels of monsters you control are 10 or higher: Take 1 Level 10 monster from your hand or Deck, and either add it to your hand or Special Summon it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp) return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetSum(Card.GetLevel)>=10 end) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --If the total Levels of monsters your opponent controls are 10 or higher: You can banish this card and 1 Level 10 monster from your GY, then target 1 card your opponent controls; banish it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp) return Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetSum(Card.GetLevel)>=10 end) + e2:SetCost(s.bancost) + e2:SetTarget(s.bantg) + e2:SetOperation(s.banop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +function s.thspfilter(c,e,tp,sp_chk) + return c:IsLevel(10) and (c:IsAbleToHand() or (sp_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,sp_chk) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) + local sc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp,sp_chk):GetFirst() + if not sc then return end + aux.ToHandOrElse(sc,tp, + function() return sp_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,3) + ) +end +function s.bancostfilter(c) + return c:IsLevel(10) and c:IsAbleToRemoveAsCost() +end +function s.bancost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.bancostfilter,tp,LOCATION_GRAVE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.bancostfilter,tp,LOCATION_GRAVE,0,1,1,c) + Duel.Remove(g+c,POS_FACEUP,REASON_COST) +end +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.banop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c79966218.lua b/official/c79966218.lua new file mode 100644 index 0000000000..84d3b9607e --- /dev/null +++ b/official/c79966218.lua @@ -0,0 +1,100 @@ +--血樹竜姫ドラセレア +--Draselea the Blood Tree Dragon Princess +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can send 1 Level 4 or lower Plant monster from your Deck to the GY, except "Draselea the Blood Tree Dragon Princess"; Special Summon this card from your hand, and if you do, its Level becomes the sent monster's + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.AND(s.selfspcost,s.effcost)) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --You can banish this card and 1 Plant monster from your GY; Special Summon 1 Dragon monster from your hand or GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.AND(s.dragonspcost,s.effcost)) + e2:SetTarget(s.dragonsptg) + e2:SetOperation(s.dragonspop) + c:RegisterEffect(e2) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsRace(RACE_DRAGON|RACE_PLANT) end) +end +s.listed_names={id} +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end + --You cannot Special Summon the turn you activate either of this card's effects, except Dragon or Plant monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_DRAGON|RACE_PLANT) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.selfspcostfilter(c) + return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and not c:IsCode(id) 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 sc=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + Duel.SendtoGrave(sc,REASON_COST) + e:SetLabel(sc:GetLevel()) +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) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then + --Its Level becomes the sent monster's + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(e:GetLabel()) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end + Duel.SpecialSummonComplete() +end +function s.dragonspcostfilter(c,e,tp,handler) + return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost() + and Duel.IsExistingMatchingCard(s.dragonspfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,Group.FromCards(c,handler),e,tp) +end +function s.dragonspfilter(c,e,tp) + return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.dragonspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemoveAsCost() + and Duel.IsExistingMatchingCard(s.dragonspcostfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.dragonspcostfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp,c) + Duel.Remove(g+c,POS_FACEUP,REASON_COST) +end +function s.dragonsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.dragonspfilter,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.dragonspop(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.dragonspfilter),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 \ No newline at end of file diff --git a/official/c81101309.lua b/official/c81101309.lua new file mode 100644 index 0000000000..7552558ffa --- /dev/null +++ b/official/c81101309.lua @@ -0,0 +1,78 @@ +--夜光列車ブルートラベラー +--Noctilucent Train Bleu Traveler +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Train Connection" or "Revolving Switchyard" from your Deck or GY to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_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) + --Special Summon both 1 other EARTH Machine monster in your GY and this card, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Machine monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={60879050,76136345} --"Train Connection", "Revolving Switchyard" +function s.thfilter(c) + return c:IsCode(60879050,76136345) 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|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.spfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then + Duel.SpecialSummon(Group.FromCards(c,tc),0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Machine 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: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/c82119326.lua b/official/c82119326.lua new file mode 100644 index 0000000000..87d24d4647 --- /dev/null +++ b/official/c82119326.lua @@ -0,0 +1,66 @@ +--テールズオブ妖精伝姫 +--Tales of Fairy Tail +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + aux.AddEquipProcedure(c) + --The equipped monster gains 1000 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(1000) + c:RegisterEffect(e1) + --Fusion Summon 1 Spellcaster Fusion Monster from your Extra Deck, using monsters from your hand or field, when you do, you can also use any "Fairy Prince" your opponent controls + local fusion_params={ + handler=c, + fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER), + extrafil=function(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.FaceupFilter(Card.IsCode,CARD_FAIRY_PRINCE)),tp,0,LOCATION_ONFIELD,nil) end + } + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2) + --Equip this card to a "Fairy Tail" monster on the field, then immediately after this effect resolves, you can Normal Summon 1 Spellcaster monster with 1850 ATK + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_EQUIP+CATEGORY_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,id) + e3:SetTarget(s.eqtg) + e3:SetOperation(s.eqop) + c:RegisterEffect(e3) +end +s.listed_series={SET_FAIRY_TAIL} +s.listed_names={CARD_FAIRY_PRINCE} +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) +end +function s.nsfilter(c) + return c:IsRace(RACE_SPELLCASTER) and c:IsAttack(1850) and c:IsSummonable(true,nil) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local sc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + if Duel.Equip(tp,c,sc) and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local nsc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() + if nsc then + Duel.Summon(tp,nsc,true,nil) + end + end + end +end \ No newline at end of file diff --git a/official/c82159583.lua b/official/c82159583.lua new file mode 100644 index 0000000000..ad1a10c75d --- /dev/null +++ b/official/c82159583.lua @@ -0,0 +1,86 @@ +--道化の一座 ホワイトフェイス +--Clown Crew Biancaviso +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You can Tribute Summon this card face-up by Tributing 1 Ritual, Fusion, Synchro, Xyz, Pendulum, or Link Monster + local e0=aux.AddNormalSummonProcedure(c,true,true,1,1,SUMMON_TYPE_TRIBUTE,aux.Stringid(id,0),s.tributefilter) + --If this card is Tribute Summoned: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Biancaviso" once per turn) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCondition(function(e) return c:IsTributeSummoned() end) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Once per turn, during your opponent's Main Phase, you can (Quick Effect): Immediately after this effect resolves, Tribute Summon 1 monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_SUMMON+CATEGORY_SET) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.IsMainPhase(1-tp) end) + e2:SetTarget(s.tribsumtg) + e2:SetOperation(s.tribsumop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +function s.tributefilter(c,tp) + return c:IsType(TYPE_RITUAL|TYPE_PENDULUM|TYPE_EXTRA) and (c:IsControler(tp) or c:IsFaceup()) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local ct=e:GetHandler():GetMaterialCount() + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsPlayerCanDraw(tp,ct) + local b2=not Duel.HasFlagEffect(tp,id+1) + and Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,ct,nil) + if chk==0 then return ct>0 and (b1 or b2) end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + e:SetLabel(op,ct) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_DRAW) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_DISABLE) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,ct,1-tp,LOCATION_ONFIELD) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op,ct=e:GetLabel() + if op==1 then + --● Draw cards equal to the number of monsters Tributed for its Tribute Summon + Duel.Draw(tp,ct,REASON_EFFECT) + elseif op==2 then + --● Negate the effects of face-up cards your opponent controls, equal to the number of monsters Tributed for its Tribute Summon + local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) + if #g>=ct then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + g=g:Select(tp,ct,ct,nil) + Duel.HintSelection(g) + local c=e:GetHandler() + for sc in g:Iter() do + --Negate their effects + sc:NegateEffects(c,nil,true) + end + end + end +end +function s.tribsumtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.CanSummonOrSet,tp,LOCATION_HAND,0,1,nil,true,nil,1) end + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) +end +function s.tribsumop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,Card.CanSummonOrSet,tp,LOCATION_HAND,0,1,1,nil,true,nil,1):GetFirst() + if sc then + Duel.SummonOrSet(tp,sc,true,nil,1) + end +end \ No newline at end of file diff --git a/official/c82323997.lua b/official/c82323997.lua new file mode 100644 index 0000000000..4135357721 --- /dev/null +++ b/official/c82323997.lua @@ -0,0 +1,86 @@ +--スカーレッド・ノヴァ・ドラゴン/バスター +--Red Nova Dragon/Assault Mode +--Scripted by The Razgriz +local s,id=GetID() +local CARD_RED_NOVA_DRAGON=97489701 +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeSpecialSummoned() + --Banish cards your opponent controls, up to the number of Tuners in your GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e1:SetCost(s.tempbanishcost) + e1:SetTarget(s.rmtg) + e1:SetOperation(s.rmop) + c:RegisterEffect(e1) + --Negate the attack and end Battle Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_ATTACK_ANNOUNCE) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) + e2:SetCost(s.tempbanishcost) + e2:SetOperation(s.negbpop) + c:RegisterEffect(e2) + --Special Summon 1 "Red Nova Dragon" from your GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_ASSAULT_MODE,CARD_RED_NOVA_DRAGON} +s.assault_mode=CARD_RED_NOVA_DRAGON +function s.tempbanishcost(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.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_TUNER) + and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp,chk) + local max_ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_TUNER) + if max_ct==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,max_ct,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Remove(g,POS_FACEUP,REASON_EFFECT) + end +end +function s.negbpop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateAttack() then + Duel.BreakEffect() + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) + end +end +function s.spfilter(c,e,tp) + return c:IsCode(CARD_RED_NOVA_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 \ No newline at end of file diff --git a/official/c82933935.lua b/official/c82933935.lua new file mode 100644 index 0000000000..d82113c810 --- /dev/null +++ b/official/c82933935.lua @@ -0,0 +1,91 @@ +--ミミグル・フラワー +--Mimighoul Flower +local s,id=GetID() +function s.initial_effect(c) + --FLIP: Apply these effects in sequence + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_CONTROL) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_F) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --During your Main Phase: You can Special Summon this card from your hand to your opponent's field in face-down Defense Position, or if a face-down monster is on the field, you can Special Summon this card face-up on your field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SET) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MIMIGHOUL} +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local c=e:GetHandler() + if c:IsAbleToChangeControler() then + Duel.SetOperationInfo(0,CATEGORY_CONTROL,c,1,tp,0) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_DECK) +end +function s.thfilter(c) + return (c:IsType(TYPE_FLIP) or c:IsSetCard(SET_MIMIGHOUL)) and c:IsAbleToHand() +end +function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) + local break_chk=false + --Your opponent can add 1 Flip monster or "Mimighoul" card from their Deck to their hand + local opp=1-tp + if Duel.IsExistingMatchingCard(s.thfilter,opp,LOCATION_DECK,0,1,nil) + and Duel.SelectYesNo(opp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(opp,s.thfilter,opp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + break_chk=true + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(tp,g) + Duel.ShuffleHand(opp) + end + end + --Give control of this card to your opponent + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + if break_chk then Duel.BreakEffect() end + Duel.GetControl(c,opp) + end +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return (Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp)) + or (Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and 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 not c:IsRelateToEffect(e) then return end + local b1=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp) + local b2=Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + local op=nil + if b1 and b2 then + op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + else + op=(b1 and 1) or (b2 and 2) or 1 + end + if op==1 then + if Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)==0 then return end + Duel.ConfirmCards(tp,c) + elseif op==2 then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c82997779.lua b/official/c82997779.lua new file mode 100644 index 0000000000..510937e0aa --- /dev/null +++ b/official/c82997779.lua @@ -0,0 +1,71 @@ +--デーモンの簒奪 +--Archfiend Usurpation +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_series={SET_ARCHFIEND} +function s.setfilter(c) + return c:IsSetCard(SET_ARCHFIEND) and c:IsTrap() and c:IsSSetable(true) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + local b1=((e:GetHandler():IsLocation(LOCATION_SZONE) and ft>0) or ft>1) + and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) + local ritual_params={ + lvtype=RITPROC_GREATER, + filter=aux.FilterBoolFunction(Card.IsSetCard,SET_ARCHFIEND), + location=LOCATION_HAND|LOCATION_EXTRA + } + local b2=Ritual.Target(ritual_params)(e,tp,eg,ep,ev,re,r,rp,0) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_SET) + elseif op==2 then + e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) + Ritual.Target(ritual_params)(e,tp,eg,ep,ev,re,r,rp,1) + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_EXTRA) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Set 1 "Archfiend" Trap from your Deck or GY, it can be activated this turn + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() + if sc and Duel.SSet(tp,sc)>0 then + --It can be activated this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + end + elseif op==2 then + --Ritual Summon 1 "Archfiend" Ritual Monster from your hand or face-up Extra Deck, by Tributing monsters from your hand or field whose total Levels equal or exceed its Level + local ritual_params={ + lvtype=RITPROC_GREATER, + filter=aux.FilterBoolFunction(Card.IsSetCard,SET_ARCHFIEND), + location=LOCATION_HAND|LOCATION_EXTRA + } + Ritual.Operation(ritual_params)(e,tp,eg,ep,ev,re,r,rp) + end +end \ No newline at end of file diff --git a/official/c83232904.lua b/official/c83232904.lua new file mode 100644 index 0000000000..bd54fb9a35 --- /dev/null +++ b/official/c83232904.lua @@ -0,0 +1,121 @@ +--道化の一座『極芸』 +--Clown Crew "Malabarism" +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon up to 2 "Clown Crew" monsters from your Deck and/or Extra Deck, ignoring their Summoning conditions, also you cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next turn after this card resolves + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + 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 in your GY, except the turn it was sent there: You can banish it and Tribute 1 monster from your hand or field, then target 1 card on the field; return it to the hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(aux.exccon) + e2:SetCost(Cost.AND(Cost.SelfBanish,s.rthcost)) + e2:SetTarget(s.rthtg) + e2:SetOperation(s.rthop) + c:RegisterEffect(e2) +end +s.listed_series={SET_CLOWN_CREW} +function s.spfilter(c,e,tp,mmz_chk) + if not (c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end + if c:IsLocation(LOCATION_DECK) then + return mmz_chk + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + end +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.pendlinkfilter(c) + return (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()) or c:IsLinkMonster() +end +function s.rescon(mmz_ct,linkmz_ct) + return function(sg,e,tp,mg) + return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=mmz_ct + and sg:FilterCount(s.pendlinkfilter,nil)<=linkmz_ct + end +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if e:IsHasType(EFFECT_TYPE_ACTIVATE) then + --You cannot activate the effects of monsters Special Summoned from the Deck or Extra Deck until the end of the next turn after this card resolves + 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_ACTIVATE) + e1:SetTargetRange(1,0) + e1:SetValue(s.aclimit) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) + end + local mmz_ct=Duel.GetLocationCount(tp,LOCATION_MZONE) + local emz_ct=Duel.GetLocationCountFromEx(tp,tp,nil,nil,ZONES_EMZ) + local linkmz_ct=Duel.GetLocationCountFromEx(tp,tp) + local ft=math.min(mmz_ct+emz_ct,2) + if ft<=0 then return end + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp,mmz_ct>0) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) + if #sg==0 then return end + local fup,fdown=sg:Split(s.pendlinkfilter,nil) + local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) + local priority_0,priority_1 + if linkmz_ct0 + 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 + --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,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c: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.extransop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,4)) + --During your Main Phase this turn, you can Normal Summon 1 "Resonator" monster in addition to your Normal Summon/Set (you can only gain this effect once per turn) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,5)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_RESONATOR) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.lvfilter(c) + return c:IsType(TYPE_TUNER) and not c:IsLevel(1) and c:IsFaceup() +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end + local max_ct=Duel.GetTargetCount(s.lvfilter,tp,LOCATION_MZONE,0,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,max_ct,nil) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,tp,1) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tg=Duel.GetTargetCards(e) + for tc in tg:Iter() do + --Their Levels become 1 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCategory(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c84054556.lua b/official/c84054556.lua new file mode 100644 index 0000000000..e0bcf8396f --- /dev/null +++ b/official/c84054556.lua @@ -0,0 +1,79 @@ +--終刻反転『A.D.R.A.S.T.E.I.A.』 +--DoomZ Command "A.D.R.A.S.T.E.I.A." +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + aux.AddEquipProcedure(c) + --The first time the equipped monster would be destroyed by battle each turn, it is not destroyed + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e1:SetCountLimit(1) + e1:SetValue(function(e,re,r,rp) return (r&REASON_BATTLE)>0 end) + c:RegisterEffect(e1) + --During your Main Phase: You can destroy the equipped monster, and if you do, Special Summon 1 other "DoomZ" monster from your hand, GY, or banishment in Defense Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --If this card is in your GY: You can target 1 face-up monster you control; equip this card to it, then take damage equal to its Level/Rank x 100 + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_EQUIP+CATEGORY_DAMAGE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.eqtg) + e3:SetOperation(s.eqop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DOOMZ} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DOOMZ) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local ec=e:GetHandler():GetEquipTarget() + if chk==0 then return Duel.GetMZoneCount(tp,ec)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,ec,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local ec=e:GetHandler():GetEquipTarget() + if ec and Duel.Destroy(ec,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,ec,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + end +end +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return c:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + local lv_rnk=(tc:HasLevel() and tc:GetLevel()) + or (tc:HasRank() and tc:GetRank()) or 0 + Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,lv_rnk*100) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Equip(tp,c,tc) then + local lv_rnk=(tc:HasLevel() and tc:GetLevel()) + or (tc:HasRank() and tc:GetRank()) or 0 + Duel.BreakEffect() + Duel.Damage(tp,lv_rnk*100,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c89176044.lua b/official/c89176044.lua new file mode 100644 index 0000000000..46e767e7b1 --- /dev/null +++ b/official/c89176044.lua @@ -0,0 +1,86 @@ +--捕食原生 +--Predaprimitive +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Send 1 "Predap" card from your Deck to the GY; add 1 "Polymerization" Spell or "Fusion" Spell from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(s.thcost) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --You can banish this card from your GY, then target 1 Fusion monster you control; destroy it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCondition(s.descon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_FUSION,SET_PREDAP} +s.listed_names={id} +function s.tgfilter(c,tp) + return c:IsSetCard(SET_PREDAP) and c:IsAbleToGraveAsCost() and not c:IsCode(id) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,c) +end +function s.thfilter(c) + return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp) + Duel.SendtoGrave(g,REASON_COST) +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 + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + --You cannot Special Summon monsters for the rest of the this turn after this card resolves, except Plant and Dragon monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_PLANT|RACE_DRAGON) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(Card.IsControler,1,nil,1-tp) +end +function s.desfilter(c) + return c:IsFaceup() and c:IsFusionMonster() +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,0,1,nil) end + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c90011273.lua b/official/c90011273.lua new file mode 100644 index 0000000000..c4b6304fb3 --- /dev/null +++ b/official/c90011273.lua @@ -0,0 +1,89 @@ +--ブリーチヴァレル・ドラゴン +--Breechborrel Dragon +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 DARK Dragon monsters, including a "Rokket" monster + Link.AddProcedure(c,s.matfilter,2,nil,s.matcheck) + --If this card is Link Summoned: You can add 1 "Borrel" Spell/Trap 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) return e:GetHandler():IsLinkSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --(Quick Effect): You can target 1 DARK monster you control; it gains 500 ATK, or if that monster is no longer on the field, you can Special Summon 1 "Rokket" monster from your Deck in Defense Position instead + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetTarget(s.atktg) + e2:SetOperation(s.atkop) + e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_BORREL,SET_ROKKET} +function s.matfilter(c,linkc,st,tp) + return c:IsAttribute(ATTRIBUTE_DARK,linkc,st,tp) and c:IsRace(RACE_DRAGON,linkc,st,tp) +end +function s.matcheck(g,linkc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_ROKKET,linkc,sumtype,tp) +end +function s.thfilter(c) + return c:IsSetCard(SET_BORREL) 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.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttribute(ATTRIBUTE_DARK) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_DARK),tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_DARK),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + if tc:IsFacedown() then return end + --It gains 500 ATK + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(500) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + elseif Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + end +end \ No newline at end of file diff --git a/official/c91237821.lua b/official/c91237821.lua new file mode 100644 index 0000000000..364ed2ea48 --- /dev/null +++ b/official/c91237821.lua @@ -0,0 +1,67 @@ +--道化の一座 デビルズ +--Clown Crew Devils +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 3 monsters + Xyz.AddProcedure(c,nil,3,2) + --Tribute Summoned monsters you control gain 1000 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsTributeSummoned)) + e1:SetValue(1000) + c:RegisterEffect(e1) + --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Devils" once per turn) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_RELEASE) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_CLOWN_CREW} +function s.setfilter(c) + return c:IsSetCard(SET_CLOWN_CREW) and c:IsSpell() and c:IsSSetable() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(aux.AND(Card.IsXyzMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+1) + and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_TOEXTRA) + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,PLAYER_ALL,LOCATION_MZONE|LOCATION_GRAVE) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_SET) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Return all Xyz Monsters on the field and in the GYs to the Extra Deck + local g=Duel.GetMatchingGroup(aux.AND(Card.IsXyzMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) + if #g>0 then + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + elseif op==2 then + --● Set 1 "Clown Crew" Spell from your Deck + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end + end +end \ No newline at end of file diff --git a/official/c92359409.lua b/official/c92359409.lua new file mode 100644 index 0000000000..40446fbcdc --- /dev/null +++ b/official/c92359409.lua @@ -0,0 +1,88 @@ +--超弩級砲塔列車グスタフ・ロケット +--Superdreadnought Rail Cannon Gustav Rocket +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 3 Level 10 monsters, OR by discarding 1 card and using "Superdreadnought Rail Cannon Gustav Max" you control + Xyz.AddProcedure(c,nil,10,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop) + --Negate that effect, and if you do, destroy that monster, then inflict 1000 damage to your opponent + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY+CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(s.discon) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --Detach 1 material from this card or destroy it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetTarget(s.detachtg) + e2:SetOperation(s.detachop) + c:RegisterEffect(e2) +end +s.listed_names={id,56910167} --"Superdreadnought Rail Cannon Gustav Max" +function s.ovfilter(c,tp,xyzc) + return c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,56910167) and c:IsFaceup() +end +function s.xyzop(e,tp,chk,mc) + if chk==0 then return not Duel.HasFlagEffect(tp,id) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) + local sc=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil):SelectUnselect(Group.CreateGroup(),tp,false,Xyz.ProcCancellable) + if sc and Duel.SendtoGrave(sc,REASON_DISCARD|REASON_COST)>0 then + return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) + else + return false + end +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsMonsterEffect() and e:GetHandler():GetOverlayCount()>0 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,tp,0) + local rc=re:GetHandler() + if rc:IsDestructable() and rc:IsRelateToEffect(re) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) + end +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then + Duel.BreakEffect() + Duel.Damage(1-tp,1000,REASON_EFFECT) + end +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_DESTROY,c,1,tp,0) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) +end +function s.detachop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + local b1=c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) + local b2=true + --Detach 1 material from this card or destroy it + local op=b1 and Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) or 2 + if op==1 then + c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) + elseif op==2 then + Duel.Destroy(c,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c93172951.lua b/official/c93172951.lua new file mode 100644 index 0000000000..a6b776bd14 --- /dev/null +++ b/official/c93172951.lua @@ -0,0 +1,79 @@ +--道化の一座 メテオ +--Clown Crew Meteor +--scripted by Hatter +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) + --Your opponent cannot activate cards or effects when your monster is Tribute Summoned + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetRange(LOCATION_MZONE) + e1:SetOperation(s.limop) + c:RegisterEffect(e1) + --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Meteor" once per turn) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_RELEASE) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_CLOWN_CREW} +function s.tsfilter(c,tp) + return c:IsTributeSummoned() and c:IsSummonPlayer(tp) +end +function s.limop(e,tp,eg,ep,ev,re,r,rp) + if eg:IsExists(s.tsfilter,1,nil,tp) then + Duel.SetChainLimitTillChainEnd(function(e,_rp,_tp) return _tp==_rp end) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_CLOWN_CREW) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(aux.AND(Card.IsSynchroMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+1) + and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_TOEXTRA) + e:SetProperty(EFFECT_FLAG_DELAY) + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,PLAYER_ALL,LOCATION_MZONE|LOCATION_GRAVE) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_TOHAND) + e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Return all Synchro Monsters on the field and in the GYs to the Extra Deck + local g=Duel.GetMatchingGroup(aux.AND(Card.IsSynchroMonster,Card.IsFaceup,Card.IsAbleToExtra),tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) + if #g>0 then + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + elseif op==2 then + --● Target 1 "Clown Crew" card in your GY, except "Clown Crew Meteor"; add it to your hand + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c99398682.lua b/official/c99398682.lua new file mode 100644 index 0000000000..39d7bcedae --- /dev/null +++ b/official/c99398682.lua @@ -0,0 +1,52 @@ +--クリムゾン・ヘルコール +--Crimson Call +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Add 1 Level 4 or lower Fiend monster from your GY to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_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) + --Allow your "/Assault Mode" monster or "Red Dragon Archfiend" to make a second attack in a row + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_DAMAGE_STEP_END) + e2:SetRange(LOCATION_GRAVE) + e2:SetCondition(s.atkcon) + e2:SetCost(Cost.SelfBanish) + e2:SetOperation(function() Duel.ChainAttack() end) + c:RegisterEffect(e2) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +s.listed_series={SET_ASSAULT_MODE} +function s.thfilter(c) + return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsAbleToHand() +end +function s.rdafilter(c) + return (c:IsCode(CARD_RED_DRAGON_ARCHFIEND) or (c:IsSynchroMonster() and c:ListsCode(CARD_RED_DRAGON_ARCHFIEND))) and c:IsFaceup() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local locations=Duel.IsExistingMatchingCard(s.rdafilter,tp,LOCATION_MZONE,0,1,nil) and LOCATION_GRAVE|LOCATION_DECK or LOCATION_GRAVE + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,locations,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,locations) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local locations=Duel.IsExistingMatchingCard(s.rdafilter,tp,LOCATION_MZONE,0,1,nil) and LOCATION_GRAVE|LOCATION_DECK or LOCATION_GRAVE + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,locations,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + local ac=Duel.GetAttacker() + return ac:IsControler(tp) and ac:CanChainAttack() and (ac:IsCode(CARD_RED_DRAGON_ARCHFIEND) or ac:IsSetCard(SET_ASSAULT_MODE)) +end