From 4c8f84dd7bec87a3c8a93a1f46bf3b8ece9048d4 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 25 Jun 2026 19:57:56 +0300 Subject: [PATCH 1/4] Delete pre-release directory --- pre-release/c100200290.lua | 73 ------------------ pre-release/c100200291.lua | 93 ----------------------- pre-release/c100200292.lua | 65 ---------------- pre-release/c100200293.lua | 66 ----------------- pre-release/c100200294.lua | 75 ------------------- pre-release/c100295121.lua | 111 ---------------------------- pre-release/c100296302.lua | 76 ------------------- pre-release/c100455001.lua | 84 --------------------- pre-release/c100455002.lua | 58 --------------- pre-release/c100455003.lua | 85 --------------------- pre-release/c100455004.lua | 86 --------------------- pre-release/c100455005.lua | 89 ---------------------- pre-release/c100455006.lua | 96 ------------------------ pre-release/c100455007.lua | 96 ------------------------ pre-release/c100455023.lua | 61 --------------- pre-release/c100455024.lua | 82 -------------------- pre-release/c100455025.lua | 80 -------------------- pre-release/c100455026.lua | 107 --------------------------- pre-release/c100455027.lua | 97 ------------------------ pre-release/c100455028.lua | 61 --------------- pre-release/c100455029.lua | 69 ----------------- pre-release/c100455047.lua | 114 ---------------------------- pre-release/c100455048.lua | 109 --------------------------- pre-release/c100455049.lua | 101 ------------------------- pre-release/c100455050.lua | 100 ------------------------- pre-release/c100455051.lua | 114 ---------------------------- pre-release/c100455052.lua | 77 ------------------- pre-release/c100455053.lua | 81 -------------------- pre-release/c100456001.lua | 72 ------------------ pre-release/c100456002.lua | 94 ----------------------- pre-release/c100456003.lua | 82 -------------------- pre-release/c100456004.lua | 83 --------------------- pre-release/c100456005.lua | 125 ------------------------------- pre-release/c100456006.lua | 94 ----------------------- pre-release/c100456007.lua | 65 ---------------- pre-release/c100456008.lua | 71 ------------------ pre-release/c100456009.lua | 89 ---------------------- pre-release/c100456010.lua | 62 ---------------- pre-release/c100457001.lua | 85 --------------------- pre-release/c100457002.lua | 96 ------------------------ pre-release/c100457003.lua | 73 ------------------ pre-release/c100457102.lua | 95 ------------------------ pre-release/c101304081.lua | 90 ---------------------- pre-release/c101304082.lua | 65 ---------------- pre-release/c101304083.lua | 97 ------------------------ pre-release/c101304084.lua | 72 ------------------ pre-release/c101304085.lua | 101 ------------------------- pre-release/c101304086.lua | 77 ------------------- pre-release/c101304087.lua | 81 -------------------- pre-release/c101304088.lua | 90 ---------------------- pre-release/c101304089.lua | 78 ------------------- pre-release/c101304090.lua | 74 ------------------- pre-release/c101304091.lua | 89 ---------------------- pre-release/c101304092.lua | 86 --------------------- pre-release/c101304093.lua | 116 ----------------------------- pre-release/c101304094.lua | 77 ------------------- pre-release/c101304095.lua | 73 ------------------ pre-release/c101304096.lua | 52 ------------- pre-release/c101305001.lua | 105 -------------------------- pre-release/c101305002.lua | 88 ---------------------- pre-release/c101305003.lua | 95 ------------------------ pre-release/c101305004.lua | 78 ------------------- pre-release/c101305005.lua | 82 -------------------- pre-release/c101305006.lua | 104 -------------------------- pre-release/c101305007.lua | 93 ----------------------- pre-release/c101305008.lua | 75 ------------------- pre-release/c101305009.lua | 108 --------------------------- pre-release/c101305010.lua | 120 ------------------------------ pre-release/c101305011.lua | 83 --------------------- pre-release/c101305012.lua | 80 -------------------- pre-release/c101305013.lua | 83 --------------------- pre-release/c101305014.lua | 83 --------------------- pre-release/c101305015.lua | 91 ----------------------- pre-release/c101305016.lua | 87 ---------------------- pre-release/c101305017.lua | 102 ------------------------- pre-release/c101305018.lua | 93 ----------------------- pre-release/c101305019.lua | 89 ---------------------- pre-release/c101305020.lua | 83 --------------------- pre-release/c101305021.lua | 90 ---------------------- pre-release/c101305022.lua | 99 ------------------------- pre-release/c101305023.lua | 109 --------------------------- pre-release/c101305024.lua | 55 -------------- pre-release/c101305025.lua | 118 ----------------------------- pre-release/c101305026.lua | 83 --------------------- pre-release/c101305027.lua | 89 ---------------------- pre-release/c101305028.lua | 74 ------------------- pre-release/c101305029.lua | 91 ----------------------- pre-release/c101305030.lua | 70 ------------------ pre-release/c101305031.lua | 88 ---------------------- pre-release/c101305032.lua | 67 ----------------- pre-release/c101305033.lua | 88 ---------------------- pre-release/c101305034.lua | 92 ----------------------- pre-release/c101305035.lua | 57 -------------- pre-release/c101305036.lua | 74 ------------------- pre-release/c101305037.lua | 96 ------------------------ pre-release/c101305038.lua | 76 ------------------- pre-release/c101305039.lua | 77 ------------------- pre-release/c101305040.lua | 84 --------------------- pre-release/c101305041.lua | 69 ----------------- pre-release/c101305042.lua | 74 ------------------- pre-release/c101305043.lua | 107 --------------------------- pre-release/c101305044.lua | 49 ------------ pre-release/c101305045.lua | 98 ------------------------ pre-release/c101305046.lua | 101 ------------------------- pre-release/c101305047.lua | 66 ----------------- pre-release/c101305048.lua | 97 ------------------------ pre-release/c101305049.lua | 83 --------------------- pre-release/c101305050.lua | 89 ---------------------- pre-release/c101305051.lua | 117 ----------------------------- pre-release/c101305052.lua | 101 ------------------------- pre-release/c101305053.lua | 54 -------------- pre-release/c101305054.lua | 99 ------------------------- pre-release/c101305055.lua | 67 ----------------- pre-release/c101305056.lua | 75 ------------------- pre-release/c101305057.lua | 66 ----------------- pre-release/c101305058.lua | 87 ---------------------- pre-release/c101305059.lua | 107 --------------------------- pre-release/c101305060.lua | 89 ---------------------- pre-release/c101305061.lua | 51 ------------- pre-release/c101305062.lua | 75 ------------------- pre-release/c101305063.lua | 92 ----------------------- pre-release/c101305064.lua | 112 ---------------------------- pre-release/c101305065.lua | 92 ----------------------- pre-release/c101305066.lua | 69 ----------------- pre-release/c101305067.lua | 101 ------------------------- pre-release/c101305068.lua | 90 ---------------------- pre-release/c101305069.lua | 97 ------------------------ pre-release/c101305070.lua | 88 ---------------------- pre-release/c101305071.lua | 71 ------------------ pre-release/c101305072.lua | 91 ----------------------- pre-release/c101305073.lua | 81 -------------------- pre-release/c101305074.lua | 86 --------------------- pre-release/c101305075.lua | 73 ------------------ pre-release/c101305076.lua | 96 ------------------------ pre-release/c101305077.lua | 65 ---------------- pre-release/c101305078.lua | 57 -------------- pre-release/c101305079.lua | 67 ----------------- pre-release/c101305080.lua | 61 --------------- pre-release/c101305081.lua | 112 ---------------------------- pre-release/c101305082.lua | 82 -------------------- pre-release/c101305083.lua | 89 ---------------------- pre-release/c101305084.lua | 71 ------------------ pre-release/c101305085.lua | 96 ------------------------ pre-release/c101305086.lua | 84 --------------------- pre-release/c101305087.lua | 76 ------------------- pre-release/c101305088.lua | 85 --------------------- pre-release/c101305089.lua | 126 ------------------------------- pre-release/c101305090.lua | 94 ----------------------- pre-release/c101305091.lua | 86 --------------------- pre-release/c101305092.lua | 94 ----------------------- pre-release/c101305093.lua | 86 --------------------- pre-release/c101305094.lua | 93 ----------------------- pre-release/c101305095.lua | 77 ------------------- pre-release/c101305096.lua | 82 -------------------- pre-release/c101305127.lua | 3 - pre-release/c101305128.lua | 3 - pre-release/c101305129.lua | 3 - pre-release/c101402001.lua | 99 ------------------------- pre-release/c101402002.lua | 70 ------------------ pre-release/c101402003.lua | 72 ------------------ pre-release/c101402004.lua | 69 ----------------- pre-release/c101402009.lua | 108 --------------------------- pre-release/c101402010.lua | 100 ------------------------- pre-release/c101402011.lua | 110 --------------------------- pre-release/c101402012.lua | 100 ------------------------- pre-release/c101402013.lua | 91 ----------------------- pre-release/c101402014.lua | 67 ----------------- pre-release/c101402015.lua | 75 ------------------- pre-release/c101402016.lua | 71 ------------------ pre-release/c101402021.lua | 98 ------------------------ pre-release/c101402022.lua | 89 ---------------------- pre-release/c101402023.lua | 90 ---------------------- pre-release/c101402024.lua | 83 --------------------- pre-release/c101402025.lua | 82 -------------------- pre-release/c101402030.lua | 89 ---------------------- pre-release/c101402032.lua | 70 ------------------ pre-release/c101402035.lua | 83 --------------------- pre-release/c101402036.lua | 117 ----------------------------- pre-release/c101402037.lua | 106 -------------------------- pre-release/c101402039.lua | 148 ------------------------------------- pre-release/c101402040.lua | 74 ------------------- pre-release/c101402041.lua | 86 --------------------- pre-release/c101402045.lua | 70 ------------------ pre-release/c101402046.lua | 115 ---------------------------- pre-release/c101402047.lua | 99 ------------------------- pre-release/c101402049.lua | 82 -------------------- pre-release/c101402050.lua | 93 ----------------------- pre-release/c101402051.lua | 86 --------------------- pre-release/c101402052.lua | 94 ----------------------- pre-release/c101402053.lua | 121 ------------------------------ pre-release/c101402054.lua | 110 --------------------------- pre-release/c101402057.lua | 100 ------------------------- pre-release/c101402058.lua | 53 ------------- pre-release/c101402059.lua | 71 ------------------ pre-release/c101402060.lua | 68 ----------------- pre-release/c101402062.lua | 96 ------------------------ pre-release/c101402063.lua | 60 --------------- pre-release/c101402068.lua | 49 ------------ pre-release/c101402070.lua | 68 ----------------- pre-release/c101402071.lua | 98 ------------------------ pre-release/c101402073.lua | 72 ------------------ pre-release/c101402074.lua | 73 ------------------ pre-release/c101402075.lua | 64 ---------------- pre-release/c101402076.lua | 85 --------------------- pre-release/c101402136.lua | 3 - 205 files changed, 17238 deletions(-) delete mode 100644 pre-release/c100200290.lua delete mode 100644 pre-release/c100200291.lua delete mode 100644 pre-release/c100200292.lua delete mode 100644 pre-release/c100200293.lua delete mode 100644 pre-release/c100200294.lua delete mode 100644 pre-release/c100295121.lua delete mode 100644 pre-release/c100296302.lua delete mode 100644 pre-release/c100455001.lua delete mode 100644 pre-release/c100455002.lua delete mode 100644 pre-release/c100455003.lua delete mode 100644 pre-release/c100455004.lua delete mode 100644 pre-release/c100455005.lua delete mode 100644 pre-release/c100455006.lua delete mode 100644 pre-release/c100455007.lua delete mode 100644 pre-release/c100455023.lua delete mode 100644 pre-release/c100455024.lua delete mode 100644 pre-release/c100455025.lua delete mode 100644 pre-release/c100455026.lua delete mode 100644 pre-release/c100455027.lua delete mode 100644 pre-release/c100455028.lua delete mode 100644 pre-release/c100455029.lua delete mode 100644 pre-release/c100455047.lua delete mode 100644 pre-release/c100455048.lua delete mode 100644 pre-release/c100455049.lua delete mode 100644 pre-release/c100455050.lua delete mode 100644 pre-release/c100455051.lua delete mode 100644 pre-release/c100455052.lua delete mode 100644 pre-release/c100455053.lua delete mode 100644 pre-release/c100456001.lua delete mode 100644 pre-release/c100456002.lua delete mode 100644 pre-release/c100456003.lua delete mode 100644 pre-release/c100456004.lua delete mode 100644 pre-release/c100456005.lua delete mode 100644 pre-release/c100456006.lua delete mode 100644 pre-release/c100456007.lua delete mode 100644 pre-release/c100456008.lua delete mode 100644 pre-release/c100456009.lua delete mode 100644 pre-release/c100456010.lua delete mode 100644 pre-release/c100457001.lua delete mode 100644 pre-release/c100457002.lua delete mode 100644 pre-release/c100457003.lua delete mode 100644 pre-release/c100457102.lua delete mode 100644 pre-release/c101304081.lua delete mode 100644 pre-release/c101304082.lua delete mode 100644 pre-release/c101304083.lua delete mode 100644 pre-release/c101304084.lua delete mode 100644 pre-release/c101304085.lua delete mode 100644 pre-release/c101304086.lua delete mode 100644 pre-release/c101304087.lua delete mode 100644 pre-release/c101304088.lua delete mode 100644 pre-release/c101304089.lua delete mode 100644 pre-release/c101304090.lua delete mode 100644 pre-release/c101304091.lua delete mode 100644 pre-release/c101304092.lua delete mode 100644 pre-release/c101304093.lua delete mode 100644 pre-release/c101304094.lua delete mode 100644 pre-release/c101304095.lua delete mode 100644 pre-release/c101304096.lua delete mode 100644 pre-release/c101305001.lua delete mode 100644 pre-release/c101305002.lua delete mode 100644 pre-release/c101305003.lua delete mode 100644 pre-release/c101305004.lua delete mode 100644 pre-release/c101305005.lua delete mode 100644 pre-release/c101305006.lua delete mode 100644 pre-release/c101305007.lua delete mode 100644 pre-release/c101305008.lua delete mode 100644 pre-release/c101305009.lua delete mode 100644 pre-release/c101305010.lua delete mode 100644 pre-release/c101305011.lua delete mode 100644 pre-release/c101305012.lua delete mode 100644 pre-release/c101305013.lua delete mode 100644 pre-release/c101305014.lua delete mode 100644 pre-release/c101305015.lua delete mode 100644 pre-release/c101305016.lua delete mode 100644 pre-release/c101305017.lua delete mode 100644 pre-release/c101305018.lua delete mode 100644 pre-release/c101305019.lua delete mode 100644 pre-release/c101305020.lua delete mode 100644 pre-release/c101305021.lua delete mode 100644 pre-release/c101305022.lua delete mode 100644 pre-release/c101305023.lua delete mode 100644 pre-release/c101305024.lua delete mode 100644 pre-release/c101305025.lua delete mode 100644 pre-release/c101305026.lua delete mode 100644 pre-release/c101305027.lua delete mode 100644 pre-release/c101305028.lua delete mode 100644 pre-release/c101305029.lua delete mode 100644 pre-release/c101305030.lua delete mode 100644 pre-release/c101305031.lua delete mode 100644 pre-release/c101305032.lua delete mode 100644 pre-release/c101305033.lua delete mode 100644 pre-release/c101305034.lua delete mode 100644 pre-release/c101305035.lua delete mode 100644 pre-release/c101305036.lua delete mode 100644 pre-release/c101305037.lua delete mode 100644 pre-release/c101305038.lua delete mode 100644 pre-release/c101305039.lua delete mode 100644 pre-release/c101305040.lua delete mode 100644 pre-release/c101305041.lua delete mode 100644 pre-release/c101305042.lua delete mode 100644 pre-release/c101305043.lua delete mode 100644 pre-release/c101305044.lua delete mode 100644 pre-release/c101305045.lua delete mode 100644 pre-release/c101305046.lua delete mode 100644 pre-release/c101305047.lua delete mode 100644 pre-release/c101305048.lua delete mode 100644 pre-release/c101305049.lua delete mode 100644 pre-release/c101305050.lua delete mode 100644 pre-release/c101305051.lua delete mode 100644 pre-release/c101305052.lua delete mode 100644 pre-release/c101305053.lua delete mode 100644 pre-release/c101305054.lua delete mode 100644 pre-release/c101305055.lua delete mode 100644 pre-release/c101305056.lua delete mode 100644 pre-release/c101305057.lua delete mode 100644 pre-release/c101305058.lua delete mode 100644 pre-release/c101305059.lua delete mode 100644 pre-release/c101305060.lua delete mode 100644 pre-release/c101305061.lua delete mode 100644 pre-release/c101305062.lua delete mode 100644 pre-release/c101305063.lua delete mode 100644 pre-release/c101305064.lua delete mode 100644 pre-release/c101305065.lua delete mode 100644 pre-release/c101305066.lua delete mode 100644 pre-release/c101305067.lua delete mode 100644 pre-release/c101305068.lua delete mode 100644 pre-release/c101305069.lua delete mode 100644 pre-release/c101305070.lua delete mode 100644 pre-release/c101305071.lua delete mode 100644 pre-release/c101305072.lua delete mode 100644 pre-release/c101305073.lua delete mode 100644 pre-release/c101305074.lua delete mode 100644 pre-release/c101305075.lua delete mode 100644 pre-release/c101305076.lua delete mode 100644 pre-release/c101305077.lua delete mode 100644 pre-release/c101305078.lua delete mode 100644 pre-release/c101305079.lua delete mode 100644 pre-release/c101305080.lua delete mode 100644 pre-release/c101305081.lua delete mode 100644 pre-release/c101305082.lua delete mode 100644 pre-release/c101305083.lua delete mode 100644 pre-release/c101305084.lua delete mode 100644 pre-release/c101305085.lua delete mode 100644 pre-release/c101305086.lua delete mode 100644 pre-release/c101305087.lua delete mode 100644 pre-release/c101305088.lua delete mode 100644 pre-release/c101305089.lua delete mode 100644 pre-release/c101305090.lua delete mode 100644 pre-release/c101305091.lua delete mode 100644 pre-release/c101305092.lua delete mode 100644 pre-release/c101305093.lua delete mode 100644 pre-release/c101305094.lua delete mode 100644 pre-release/c101305095.lua delete mode 100644 pre-release/c101305096.lua delete mode 100644 pre-release/c101305127.lua delete mode 100644 pre-release/c101305128.lua delete mode 100644 pre-release/c101305129.lua delete mode 100644 pre-release/c101402001.lua delete mode 100644 pre-release/c101402002.lua delete mode 100644 pre-release/c101402003.lua delete mode 100644 pre-release/c101402004.lua delete mode 100644 pre-release/c101402009.lua delete mode 100644 pre-release/c101402010.lua delete mode 100644 pre-release/c101402011.lua delete mode 100644 pre-release/c101402012.lua delete mode 100644 pre-release/c101402013.lua delete mode 100644 pre-release/c101402014.lua delete mode 100644 pre-release/c101402015.lua delete mode 100644 pre-release/c101402016.lua delete mode 100644 pre-release/c101402021.lua delete mode 100644 pre-release/c101402022.lua delete mode 100644 pre-release/c101402023.lua delete mode 100644 pre-release/c101402024.lua delete mode 100644 pre-release/c101402025.lua delete mode 100644 pre-release/c101402030.lua delete mode 100644 pre-release/c101402032.lua delete mode 100644 pre-release/c101402035.lua delete mode 100644 pre-release/c101402036.lua delete mode 100644 pre-release/c101402037.lua delete mode 100644 pre-release/c101402039.lua delete mode 100644 pre-release/c101402040.lua delete mode 100644 pre-release/c101402041.lua delete mode 100644 pre-release/c101402045.lua delete mode 100644 pre-release/c101402046.lua delete mode 100644 pre-release/c101402047.lua delete mode 100644 pre-release/c101402049.lua delete mode 100644 pre-release/c101402050.lua delete mode 100644 pre-release/c101402051.lua delete mode 100644 pre-release/c101402052.lua delete mode 100644 pre-release/c101402053.lua delete mode 100644 pre-release/c101402054.lua delete mode 100644 pre-release/c101402057.lua delete mode 100644 pre-release/c101402058.lua delete mode 100644 pre-release/c101402059.lua delete mode 100644 pre-release/c101402060.lua delete mode 100644 pre-release/c101402062.lua delete mode 100644 pre-release/c101402063.lua delete mode 100644 pre-release/c101402068.lua delete mode 100644 pre-release/c101402070.lua delete mode 100644 pre-release/c101402071.lua delete mode 100644 pre-release/c101402073.lua delete mode 100644 pre-release/c101402074.lua delete mode 100644 pre-release/c101402075.lua delete mode 100644 pre-release/c101402076.lua delete mode 100644 pre-release/c101402136.lua diff --git a/pre-release/c100200290.lua b/pre-release/c100200290.lua deleted file mode 100644 index 667e2a7cc6..0000000000 --- a/pre-release/c100200290.lua +++ /dev/null @@ -1,73 +0,0 @@ ---運命の盤上 ---Stage of Destiny ---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 Normal Monster in your hand - 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(s.costfilter,e:GetHandlerPlayer(),LOCATION_HAND,0,1,nil) end) - c:RegisterEffect(e0) - --Special Summon up to 5 Normal Monsters from your hand and/or GY in Attack Position, also you cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetLabelObject(e0) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -function s.costfilter(c) - return c:IsType(TYPE_NORMAL) and not c:IsPublic() -end -function s.cost(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,s.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - end -end -function s.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.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.activate(e,tp,eg,ep,ev,re,r,rp) - local mmz_count=Duel.GetLocationCount(tp,LOCATION_MZONE) - if mmz_count>0 then - mmz_count=math.min(mmz_count,5) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then mmz_count=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,mmz_count,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end - end - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - --You cannot Special Summon from the Extra Deck for the rest of this 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_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c100200291.lua b/pre-release/c100200291.lua deleted file mode 100644 index dfd10e81bc..0000000000 --- a/pre-release/c100200291.lua +++ /dev/null @@ -1,93 +0,0 @@ ---カプセル・モンスター・チェス ---Capsule Monster Chess ---scripted by Naim -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 Main Phase: The turn player can target 1 monster in their GY; they place it face-up in their Spell & Trap Zone as a Continuous Spell - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_LEAVE_GRAVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_BOTH_SIDE) - e1:SetRange(LOCATION_FZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.pltg) - e1:SetOperation(s.plop) - c:RegisterEffect(e1) - --During the End Phase: The turn player can send 1 face-up Monster Card they control to the GY; they Special Summon 1 monster from their Deck with the same original Type and Attribute, but 1, 2, or 3 original Levels higher - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) - return Duel.IsTurnPlayer(tp) - end) - e2:SetCost(s.spcost) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.plfilter(c,tp) - return c:IsMonster() and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.plfilter(chkc,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(s.plfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectTarget(tp,s.plfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,tp,0) -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then - --Treated as a Continuous Spell - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)) - tc:RegisterEffect(e1) - end -end -function s.spcostfilter(c,e,tp) - return c:IsMonsterCard() and c:IsFaceup() and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalRace(),c:GetOriginalAttribute(),c:GetOriginalLevel()) -end -function s.spfilter(c,e,tp,original_race,original_attr,original_lv) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsOriginalRace(original_race) and c:IsOriginalAttribute(original_attr) - and c:IsLevelBetween(original_lv+1,original_lv+3) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp):GetFirst() - Duel.SendtoGrave(sc,REASON_COST) - local cd=e:GetChainData() - cd.original_race=sc:GetOriginalRace() - cd.original_attr=sc:GetOriginalAttribute() - cd.original_lv=sc:GetOriginalLevel() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local cd=e:GetChainData() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,cd.original_race,cd.original_attr,cd.original_lv) - 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/c100200292.lua b/pre-release/c100200292.lua deleted file mode 100644 index cda39ccf8b..0000000000 --- a/pre-release/c100200292.lua +++ /dev/null @@ -1,65 +0,0 @@ ---サラブレッド・エルフ ---Thoroughbred Elf ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --During your Main Phase: You can send 1 Equip Spell from your Deck to the GY, then this card gains 500 ATK until the end of your opponent's turn. You can only use this effect of "Thoroughbred Elf" once per turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.tgtg) - e1:SetOperation(s.tgop) - c:RegisterEffect(e1) - --When this card destroys an opponent's monster by battle: You can add to your hand, or Special Summon, 1 Level 4 or lower LIGHT Spellcaster monster from your Deck, except "Thoroughbred Elf" - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_BATTLE_DESTROYING) - e2:SetCondition(aux.bdocon) - e2:SetTarget(s.thsptg) - e2:SetOperation(s.thspop) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsEquipSpell,Card.IsAbleToGrave),tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,500) -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,aux.AND(Card.IsEquipSpell,Card.IsAbleToGrave),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 500 ATK until the end of your opponent's turn - c:UpdateAttack(500,RESETS_STANDARD_DISABLE_PHASE_END,c,2) - end -end -function s.thspfilter(c,e,tp,mmz_chk) - return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER) and not c:IsCode(id) - 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,0,1,nil,e,tp,mmz_chk) - end - 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) - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local tc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_chk):GetFirst() - if not tc then return end - aux.ToHandOrElse(tc,tp, - function() return mmz_chk and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, - function() Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end, - aux.Stringid(id,3) - ) -end \ No newline at end of file diff --git a/pre-release/c100200293.lua b/pre-release/c100200293.lua deleted file mode 100644 index 5fed43bd81..0000000000 --- a/pre-release/c100200293.lua +++ /dev/null @@ -1,66 +0,0 @@ ---アサルト・リオン ---Assault Lion ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can Tribute Summon this card face-up by Tributing 1 Beast-Warrior monster - aux.AddNormalSummonProcedure(c,true,true,1,1,SUMMON_TYPE_TRIBUTE,aux.Stringid(id,0),s.tribfilter) - --If this card battles a monster, any battle damage it inflicts to your opponent is doubled - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) - e1:SetCondition(function(e) return e:GetHandler():GetBattleTarget() end) - e1:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) - c:RegisterEffect(e1) - --If a Beast-Warrior monster(s) is Normal or Special Summoned to your field while this card is in your GY: You can add this card to your hand, then immediately after this effect resolves, you can Tribute Summon this card face-up, and if you do, it gains 500 ATK, also banish it when it leaves the field - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_REMOVE) - 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_GRAVE) - e2a:SetCountLimit(1,id) - e2a:SetCondition(s.thcon) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) -end -function s.tribfilter(c,tp) - return c:IsRace(RACE_BEASTWARRIOR) and (c:IsControler(tp) or c:IsFaceup()) -end -function s.thconfilter(c,tp) - return c:IsRace(RACE_BEASTWARRIOR) and c:IsControler(tp) and c:IsFaceup() -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return 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) - Duel.SetPossibleOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.thop(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 c:IsLocation(LOCATION_HAND) then - Duel.ShuffleHand(tp) - if c:IsSummonable(true,nil,1) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Summon(tp,c,true,nil,1) - --It gains 500 ATK - c:UpdateAttack(500,RESET_EVENT|(RESETS_STANDARD_DISABLE&~RESET_TOFIELD)) - --Also 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 - end -end \ No newline at end of file diff --git a/pre-release/c100200294.lua b/pre-release/c100200294.lua deleted file mode 100644 index 333e887c01..0000000000 --- a/pre-release/c100200294.lua +++ /dev/null @@ -1,75 +0,0 @@ ---パワーコネクション ---Power Connection ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Target any number of face-up monsters you control (if you target 2 or more monsters, they must have the same Type); they gain 500 ATK for each monster targeted, until the end of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - 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) - --If you activated "Armament Reincarnation" this turn: You can add this card from your GY to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --Keep track of a player activating "Armament Reincarnation" - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_CHAIN_SOLVED) - ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(53770666) then - Duel.RegisterFlagEffect(ep,id,RESET_PHASE|PHASE_END,0,1) - end - end) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_names={53770666} --"Armament Reincarnation" -function s.rescon(sg,e,tp,mg) - return #sg==1 or sg:GetClassCount(Card.GetRace)==1 -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - local g=Duel.GetTargetGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - local tg=aux.SelectUnselectGroup(g,e,tp,1,#g,s.rescon,1,tp,HINTMSG_ATKDEF) - Duel.SetTargetCard(tg) - local target_count=#tg - e:SetLabel(target_count) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tg,target_count,tp,500*target_count) -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 return end - local c=e:GetHandler() - local atk=500*e:GetLabel() - for tc in tg:Iter() do - --They gain 500 ATK for each monster targeted, until the end of this turn - tc:UpdateAttack(atk,RESETS_STANDARD_PHASE_END,c) - 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,chk) - 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/c100295121.lua b/pre-release/c100295121.lua deleted file mode 100644 index 435eae5dbc..0000000000 --- a/pre-release/c100295121.lua +++ /dev/null @@ -1,111 +0,0 @@ ---道化の一座 ハット ---Clown Crew Hat ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --During your Main Phase: You can send 1 "Clown Crew" card from your Deck to your GY, except a Pendulum Monster, and if you do, Special Summon this card, 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_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetTarget(s.gytg) - e1:SetOperation(s.gyop) - e1:SetCountLimit(1,{id,0}) - c:RegisterEffect(e1) - --Monsters your opponent controls lose 1500 DEF while you control a Tribute Summoned monster - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_UPDATE_DEFENSE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,LOCATION_MZONE) - e2:SetCondition(function(e) return Duel.IsExistingMatchingCard(Card.IsTributeSummoned,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end) - e2:SetValue(-1500) - c:RegisterEffect(e2) - --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Hat" once per turn); - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_RELEASE) - e3:SetTarget(s.efftg) - e3:SetOperation(s.effop) - c:RegisterEffect(e3) -end -s.listed_series={SET_CLOWN_CREW} -function s.gyfilter(c) - return c:IsSetCard(SET_CLOWN_CREW) and not c:IsPendulumMonster() and c:IsAbleToGrave() -end -function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.gyop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.gyfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,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(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.actval) - e1:SetReset(RESET_PHASE|PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end -function s.actval(e,re,tp) - local rc=re:GetHandler() - return re:IsMonsterEffect() and rc:IsLocation(LOCATION_MZONE) and rc:IsSummonLocation(LOCATION_DECK|LOCATION_EXTRA) -end -function s.spfilter(c,e,tp) - if c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)<=0 then return false end - return c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and not c:IsPendulumMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -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.IsPendulumMonster,Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_MZONE|LOCATION_EXTRA,LOCATION_MZONE|LOCATION_EXTRA,1,nil) - local b2=not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, - {b2,aux.Stringid(id,4)}) - 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_EXTRA) - elseif op==2 then - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Shuffle all Pendulum Monsters on the field and face-up Extra Decks into the Deck - local g=Duel.GetMatchingGroup(aux.AND(Card.IsPendulumMonster,Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_MZONE|LOCATION_EXTRA,LOCATION_MZONE|LOCATION_EXTRA,nil) - if #g>0 then - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end - elseif op==2 then - --● Special Summon 1 non-Pendulum "Clown Crew" monster from your Deck or Extra Deck, ignoring its Summoning conditions - 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,true,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100296302.lua b/pre-release/c100296302.lua deleted file mode 100644 index 3175781101..0000000000 --- a/pre-release/c100296302.lua +++ /dev/null @@ -1,76 +0,0 @@ ---ウィッチクラフト・シード ---Witchcrafter Seed ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is Normal or Special Summoned and you control a "Witchcrafter" monster other than "Witchcrafter Seed", or "Regulus, the Prince of Endymion": You can target 1 face-up card on the field; return it to the hand - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_TOHAND) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetTarget(s.rthtg) - e1a:SetOperation(s.rthop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --You can banish this card from your GY; reveal any number of cards in your hand, including a Spell, and shuffle them into the Deck, then draw that many cards - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.drtg) - e2:SetOperation(s.drop) - c:RegisterEffect(e2) -end -s.listed_series={SET_WITCHCRAFTER} -s.listed_names={id,CARD_REGULUS_THE_PRINCE_OF_ENDYMION} -function s.rthconfilter(c) - return ((c:IsSetCard(SET_WITCHCRAFTER) and c:IsMonster() and not c:IsCode(id)) or c:IsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION)) - and c:IsFaceup() -end -function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingMatchingCard(s.rthconfilter,tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToHand),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToHand),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.rthop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp) - and Duel.IsExistingMatchingCard(aux.AND(Card.IsSpell,Card.IsAbleToDeck,aux.NOT(Card.IsPublic)),tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsSpell,1,nil) -end -function s.drop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.AND(Card.IsAbleToDeck,aux.NOT(Card.IsPublic)),tp,LOCATION_HAND,0,nil) - if #g==0 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,1,#g,s.rescon,1,tp,HINTMSG_TODECK,s.rescon) - if #sg>0 then - Duel.ConfirmCards(1-tp,sg) - local returned_count=Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - if returned_count>0 then - Duel.ShuffleDeck(tp) - if Duel.IsPlayerCanDraw(tp) then - Duel.BreakEffect() - Duel.Draw(tp,returned_count,REASON_EFFECT) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c100455001.lua b/pre-release/c100455001.lua deleted file mode 100644 index 235f841c24..0000000000 --- a/pre-release/c100455001.lua +++ /dev/null @@ -1,84 +0,0 @@ ---ファニー・ダーク・ラビット ---Funny Dark Rabbit ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --After this card is Normal or Special Summoned, you can Normal Summon 1 monster that mentions "Toon World" during your Main Phase this turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetOperation(s.regop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --This card is treated as a Toon monster while "Toon World" is on the field - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) - e2:SetValue(TYPE_TOON) - c:RegisterEffect(e2) - --Once per turn: You can add to your hand or place face-up on your field, 1 "Toon" Field or Continuous Spell from your Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(s.thpltg) - e3:SetOperation(s.thplop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_TOON_WORLD} -s.listed_series={SET_TOON} -function s.regop(e,tp,eg,ep,ev,re,r,rp) - if Duel.HasFlagEffect(tp,id) then return end - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1)) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - --After this card is Normal or Special Summoned, you can Normal Summon 1 monster that mentions "Toon World" during your Main Phase this 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,2)) - 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:ListsCode(CARD_TOON_WORLD) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thplfilter(c,tp,szone_chk) - return c:IsSetCard(SET_TOON) and (c:IsContinuousSpell() or c:IsFieldSpell()) and (c:IsAbleToHand() - or (c:CheckUniqueOnField(tp) and not c:IsForbidden() and (c:IsFieldSpell() or szone_chk))) -end -function s.thpltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thplfilter,tp,LOCATION_DECK,0,1,nil,tp,Duel.GetLocationCount(tp,LOCATION_SZONE)>0) end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thplop(e,tp,eg,ep,ev,re,r,rp) - local szone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) - local sc=Duel.SelectMatchingCard(tp,s.thplfilter,tp,LOCATION_DECK,0,1,1,nil,tp,szone_chk):GetFirst() - if sc then - aux.ToHandOrElse(sc,tp, - function(sc) - return szone_chk or sc:IsFieldSpell() - end, - function(sc) - if sc:IsFieldSpell() then - local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) - if fc then - Duel.SendtoGrave(fc,REASON_RULE) - Duel.BreakEffect() - end - Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) - else - Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - end, - aux.Stringid(id,4) - ) - end -end \ No newline at end of file diff --git a/pre-release/c100455002.lua b/pre-release/c100455002.lua deleted file mode 100644 index 0ed2f4fc9e..0000000000 --- a/pre-release/c100455002.lua +++ /dev/null @@ -1,58 +0,0 @@ ---コミックキャット ---Comic Cat ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --This card is treated as a Toon monster while "Toon World" is on the field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_ADD_TYPE) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) - e1:SetValue(TYPE_TOON) - c:RegisterEffect(e1) - --During the Main Phase (Quick Effect): You can Tribute 1 monster (if you control "Toon World", you can Tribute 1 monster your opponent controls, even though you do not control it), and if you do, Special Summon 1 monster that mentions "Toon World" from your hand or Deck, ignoring its Summoning conditions - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - 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 -s.listed_names={CARD_TOON_WORLD} -function s.tribfilter(c,tp) - return c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:ListsCode(CARD_TOON_WORLD) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local opp_location=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),tp,LOCATION_ONFIELD,0,1,nil) and LOCATION_MZONE or 0 - return Duel.IsExistingMatchingCard(s.tribfilter,tp,LOCATION_MZONE,opp_location,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,PLAYER_EITHER,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local opp_location=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),tp,LOCATION_ONFIELD,0,1,nil) and LOCATION_MZONE or 0 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local rg=Duel.SelectMatchingCard(tp,s.tribfilter,tp,LOCATION_MZONE,opp_location,1,1,nil,tp) - if #rg==0 then return end - Duel.HintSelection(rg) - if Duel.Release(rg,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100455003.lua b/pre-release/c100455003.lua deleted file mode 100644 index d9cd4a633c..0000000000 --- a/pre-release/c100455003.lua +++ /dev/null @@ -1,85 +0,0 @@ ---エビル・ボックス ---Evil Box ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If you control "Toon World": You can Special Summon this card from your hand, then you can add to your hand or Set 1 "Toon" Trap from your Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SET) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(s.selfspcon) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --This card is treated as a Toon monster while "Toon World" is on the field - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_ADD_TYPE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) - e2:SetValue(TYPE_TOON) - c:RegisterEffect(e2) - --Once per turn (Quick Effect): You can target 1 card in either GY; place it on the bottom of the Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(s.tdtg) - e3:SetOperation(s.tdop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -s.listed_names={CARD_TOON_WORLD} -s.listed_series={SET_TOON} -function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),tp,LOCATION_ONFIELD,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) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) -end -function s.thsetfilter(c) - return c:IsSetCard(SET_TOON) and c:IsTrap() and (c:IsAbleToHand() or c:IsSSetable()) -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 - and Duel.IsExistingMatchingCard(s.thsetfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) - local sc=Duel.SelectMatchingCard(tp,s.thsetfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if not sc then return end - aux.ToHandOrElse(sc,tp, - Card.IsSSetable, - function(c) - Duel.SSet(tp,sc) - end, - aux.Stringid(id,4) - ) - end -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100455004.lua b/pre-release/c100455004.lua deleted file mode 100644 index f2a3fe4419..0000000000 --- a/pre-release/c100455004.lua +++ /dev/null @@ -1,86 +0,0 @@ ---闇の眼を持つ幻想師・ノー・フェイス ---Dark-Eyes Illusionist Faceless Mage ---scripted by Naim -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 discard this card, then activate 1 of these effects (but you can only use each of these effects of "Dark-Eyes Illusionist Faceless Mage" once per turn); - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_HAND) - e2:SetCost(Cost.SelfDiscard) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_names={100455007,CARD_TOON_WORLD} --"Mind Scan" -function s.indestg(e,c) - local handler=e:GetHandler() - return c==handler or c==handler:GetBattleTarget() -end -function s.plfilter(c,tp) - return c:IsCode(100455007) and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.thfilter(c) - return c:IsMonster() and c:ListsCode(CARD_TOON_WORLD) and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp) - and not Duel.HasFlagEffect(tp,id) - local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) - and not Duel.HasFlagEffect(tp,id+100) - 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(0) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - elseif op==2 then - e:GetHandler():CreateEffectRelation(e) - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Place 1 "Mind Scan" from your hand or Deck face-up on your field - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp):GetFirst() - if sc then - Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - elseif op==2 then - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - --● Add 1 other monster from your GY to your hand that mentions "Toon World", then you can Special Summon it, ignoring its Summoning conditions - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,exc):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and sc:IsCanBeSpecialSummoned(e,0,tp,true,false) then - Duel.ShuffleHand(tp) - if Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.BreakEffect() - Duel.SpecialSummon(sc,0,tp,tp,true,false,POS_FACEUP) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c100455005.lua b/pre-release/c100455005.lua deleted file mode 100644 index 583c2fe9f3..0000000000 --- a/pre-release/c100455005.lua +++ /dev/null @@ -1,89 +0,0 @@ ---ブルーアイズ・トゥーン・アルティメットドラゴン ---Blue-Eyes Toon Ultimate Dragon ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: "Blue-Eyes Toon Dragon" + 2 Toon monsters - Fusion.AddProcMixN(c,true,true,53183600,1,s.toonmatfilter,2) - --Must be Special Summoned (from your Extra Deck) by shuffling the above cards from your hand, field, and/or GY into the Deck/Extra Deck - Fusion.AddContactProc(c,s.contactfil,s.contactop,true) - --Your Toon monsters can attack directly - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsType(TYPE_TOON) end) - e1:SetValue(1) - c:RegisterEffect(e1) - --Once per turn: You can add 1 "Toon" card, or 1 card that mentions a "Toon" card's name, from your GY to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --During damage calculation, if your Toon monster is attacked: You can banish it until the end of the Damage Step - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(s.rmcon) - e3:SetTarget(s.rmtg) - e3:SetOperation(s.rmop) - c:RegisterEffect(e3) -end -s.listed_names={53183600} --"Blue-Eyes Toon Dragon" -s.listed_series={SET_TOON} -function s.toonmatfilter(c,fc,sumtype,tp) - return c:IsType(TYPE_TOON,fc,sumtype,tp) and c:IsMonster() -end -function s.contactfil(tp) - return Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) -end -function s.contactop(g,tp) - local fu,fd=g:Split(Card.IsFaceup,nil) - if #fu>0 then Duel.HintSelection(fu) end - if #fd>0 then Duel.ConfirmCards(1-tp,fd) end - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) -end -function s.thfilter(c) - return (c:IsSetCard(SET_TOON) or c:ListsCodeWithArchetype(SET_TOON)) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,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,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end -function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetAttackTarget() - return bc and bc:IsControler(tp) and bc:IsType(TYPE_TOON) and bc:IsAbleToRemove() -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,Duel.GetAttackTarget(),1,tp,0) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetAttackTarget() - if bc and bc:IsRelateToBattle() then - --Banish it until the end of the Damage Step - local temp_banish_eff=aux.RemoveUntil(bc,nil,REASON_EFFECT,PHASE_DAMAGE,id,e,tp,aux.DefaultFieldReturnOp) - local e1=temp_banish_eff:Clone() - e1:SetCode(EVENT_DAMAGE_STEP_END) - Duel.RegisterEffect(e1,tp) - temp_banish_eff:Reset() - end -end \ No newline at end of file diff --git a/pre-release/c100455006.lua b/pre-release/c100455006.lua deleted file mode 100644 index 478b7543ea..0000000000 --- a/pre-release/c100455006.lua +++ /dev/null @@ -1,96 +0,0 @@ ---完全なる世界 トゥーン・ワールド ---Toon World the Perfect World ---Scripted by Eerie Code -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) - --This card's name becomes "Toon World" while in the Field Zone - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_FZONE) - e1:SetValue(CARD_TOON_WORLD) - c:RegisterEffect(e1) - --Once per turn: You can add 1 "Toon" card, or 1 card that mentions a "Toon" card's name, from your Deck to your hand. You can only use this effect of "Toon World the Perfect World" thrice per turn - 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_FZONE) - e2:SetCountLimit(3,id) - e2:SetCost(s.thcost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --Before resolving another activated card or effect, you can banish 1 Toon monster you control until immediately after that card/effect resolves, also you cannot banish monsters with that same original name with this effect of "Toon World the Perfect World" for the rest of this turn - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetRange(LOCATION_FZONE) - e3:SetCondition(s.rmcon) - e3:SetOperation(s.rmop) - c:RegisterEffect(e3) - --Keep track of already banished cards - aux.GlobalCheck(s,function() - s.name_list={} - s.name_list[0]={} - s.name_list[1]={} - aux.AddValuesReset(function() - s.name_list[0]={} - s.name_list[1]={} - end) - end) -end -s.listed_names={CARD_TOON_WORLD} -s.listed_series={SET_TOON} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:HasFlagEffect(id) end - c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) -end -function s.thfilter(c) - return (c:IsSetCard(SET_TOON) or c:ListsCodeWithArchetype(SET_TOON)) 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.rmfilter(c,tp) - return c:IsType(TYPE_TOON) and c:IsFaceup() and c:IsAbleToRemove() and not s.name_list[tp][c:GetOriginalCodeRule()] -end -function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActivated() and re:GetHandler()~=e:GetHandler() - and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE,0,1,nil,tp) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE,0,nil,tp) - if #g>0 and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,1)) then - Duel.Hint(HINT_CARD,0,id) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sc=g:Select(tp,1,1,nil):GetFirst() - if sc then - Duel.HintSelection(sc) - --Banish 1 Toon monster you control until immediately after that card/effect resolves - local temp_banish_eff=aux.RemoveUntil(sc,nil,REASON_EFFECT,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp,nil,RESET_CHAIN) - local e1=temp_banish_eff:Clone() - e1:SetCode(EVENT_CHAIN_SOLVED) - Duel.RegisterEffect(e1,tp) - temp_banish_eff:Reset() - --Also you cannot banish monsters with that same original name with this effect of "Toon World the Perfect World" for the rest of this turn - s.name_list[tp][sc:GetOriginalCodeRule()]=true - end - end -end \ No newline at end of file diff --git a/pre-release/c100455007.lua b/pre-release/c100455007.lua deleted file mode 100644 index a8112031f7..0000000000 --- a/pre-release/c100455007.lua +++ /dev/null @@ -1,96 +0,0 @@ ---心を見通す眼 ---Mind Scan ---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) - e0:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e0) - --While you have a "Toon" card in your field or GY, your opponent must keep their hand revealed, also you can look at their Set cards at any time - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetCode(EFFECT_PUBLIC) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_TOON),e:GetHandlerPlayer(),LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end) - e1:SetTargetRange(0,LOCATION_HAND|LOCATION_ONFIELD) - c:RegisterEffect(e1) - --If you have a Toon monster and a "Toon" Spell in your field and/or GY: You can declare 1 card name that is not among the cards/effects activated in this Chain; negate the activated effects of cards with that original name until the end of this turn, while this card is face-up on the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(s.declcon) - e2:SetTarget(s.decltg) - e2:SetOperation(s.declop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_TOON} -function s.declconfilter(c) - return ((c:IsType(TYPE_TOON) and c:IsMonster()) or (c:IsSetCard(SET_TOON) and c:IsSpell())) and c:IsFaceup() -end -function s.declcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetMatchingGroup(s.declconfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil):GetClassCount(Card.GetMainCardType)==2 -end -function s.decltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local current_chain=Duel.GetCurrentChain() - s.announce_filter={TYPE_NORMAL,OPCODE_ISTYPE,OPCODE_NOT} - if current_chain>1 then - for i=1,current_chain-1 do - local trig_code1,trig_code2=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2) - table.insert(s.announce_filter,trig_code1) - table.insert(s.announce_filter,OPCODE_ISCODE) - table.insert(s.announce_filter,OPCODE_NOT) - table.insert(s.announce_filter,OPCODE_AND) - if trig_code2>0 then - table.insert(s.announce_filter,trig_code2) - table.insert(s.announce_filter,OPCODE_ISCODE) - table.insert(s.announce_filter,OPCODE_NOT) - table.insert(s.announce_filter,OPCODE_AND) - end - end - end - local declared_code=Duel.AnnounceCard(tp,s.announce_filter) - Duel.SetTargetParam(declared_code) - Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD_FILTER) -end -function s.declop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local declared_code=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - c:SetHint(CHINT_CARD,declared_code) - --Clear the hint at the end of the turn - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_TURN_END) - e0:SetRange(LOCATION_SZONE) - e0:SetCountLimit(1) - e0:SetOperation(function(e) c:SetHint(CHINT_CARD,0) e:Reset() end) - e0:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e0) - --Negate the activated effects of cards with that original name until the end of this turn, while this card is face-up on the field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) - local code1,code2=re:GetHandler():GetOriginalCodeRule() - return code1==declared_code or code2==declared_code - end) - e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) - end) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c100455023.lua b/pre-release/c100455023.lua deleted file mode 100644 index 580d3cd7da..0000000000 --- a/pre-release/c100455023.lua +++ /dev/null @@ -1,61 +0,0 @@ ---ウィッチクラフト・テラコッタン ---Witchcrafter Terracottan ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is in your hand: You can target 1 "Witchcrafter" card in your GY, except "Witchcrafter Terracottan"; add it to your hand, and if you do, Special Summon this card, also you cannot Special Summon from the Extra Deck for the rest of this turn, except "Witchcrafter" monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.thsptg) - e1:SetOperation(s.thspop) - c:RegisterEffect(e1) - --During your Main Phase: You can Fusion Summon 1 "Witchcrafter" Fusion Monster from your Extra Deck, using monsters from your hand or field - local fusion_params=aux.FilterBoolFunction(Card.IsSetCard,SET_WITCHCRAFTER) - 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) -end -s.listed_series={SET_WITCHCRAFTER} -s.listed_names={id} -function s.thfilter(c) - return c:IsSetCard(SET_WITCHCRAFTER) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.thsptg(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 c=e:GetHandler() - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - 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) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.thspop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and 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 "Witchcrafter" 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_WITCHCRAFTER) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/pre-release/c100455024.lua b/pre-release/c100455024.lua deleted file mode 100644 index a4db64f719..0000000000 --- a/pre-release/c100455024.lua +++ /dev/null @@ -1,82 +0,0 @@ ---ウィッチクラフト・マルカ ---Witchcrafter Marka ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can Tribute this card from your hand or field; add 1 "Witchcrafter" Field or Continuous Spell 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|LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfTribute) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If a face-up "Witchcrafter" monster(s) you control leaves the field by an opponent's card effect, while this card is in your GY: You can Special Summon this card (but banish it when it leaves the field), and if you do, Tribute 1 monster your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE+CATEGORY_RELEASE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_LEAVE_FIELD) - 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_WITCHCRAFTER} -function s.thfilter(c) - return c:IsSetCard(SET_WITCHCRAFTER) and (c:IsFieldSpell() or c:IsContinuousSpell()) 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.spconfilter(c,tp,opp) - return c:IsPreviousSetCard(SET_WITCHCRAFTER) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousControler(tp) and c:IsReasonPlayer(opp) and c:IsReason(REASON_EFFECT) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spconfilter,1,nil,tp,1-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) - and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE) -end -function s.spop(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 - --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 - if Duel.SpecialSummonComplete()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectMatchingCard(tp,Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Release(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100455025.lua b/pre-release/c100455025.lua deleted file mode 100644 index 420ef57cee..0000000000 --- a/pre-release/c100455025.lua +++ /dev/null @@ -1,80 +0,0 @@ ---大魔女サンドリヨン ---Witchcrafter Madame Rilliona ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: "Witchcrafter Madame Verre" + 2 Spellcaster monsters - Fusion.AddProcMixN(c,true,true,21522601,1,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),2) - --If this card is Fusion Summoned: You can Special Summon up to 3 Level 7 or lower "Witchcrafter" monsters with different Attributes from each other from your hand and/or Deck, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Fusion Monsters - 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:SetTarget(s.witchsptg) - e1:SetOperation(s.witchspop) - c:RegisterEffect(e1) - --During your End Phase, if this card is in your GY: You can reveal 1 Spell in your hand; Special Summon this card in Defense Position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e2:SetCost(Cost.Reveal(Card.IsSpell)) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) -end -s.listed_names={21522601} --"Witchcrafter Madame Verre" -s.listed_series={SET_WITCHCRAFTER} -s.material_setcode=SET_WITCHCRAFTER -function s.witchspfilter(c,e,tp) - return c:IsLevelBelow(7) and c:IsSetCard(SET_WITCHCRAFTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.witchsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.witchspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) -end -function s.witchspop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=Duel.GetMatchingGroup(s.witchspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) - if ft>0 and #g>0 then - local attr_count=g:GetClassCount(Card.GetAttribute) - ft=math.min(ft,3,attr_count) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dpcheck(Card.GetAttribute),1,tp,HINTMSG_SPSUMMON) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Fusion 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 c:IsLocation(LOCATION_EXTRA) and not c:IsFusionMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -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) -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_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c100455026.lua b/pre-release/c100455026.lua deleted file mode 100644 index 5e625b2a35..0000000000 --- a/pre-release/c100455026.lua +++ /dev/null @@ -1,107 +0,0 @@ ---ウィッチクラフト・ピューピルズ ---Witchcrafter Pupils ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Witchcrafter" monster + 1 Spellcaster monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_WITCHCRAFTER),aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) - --During the Main or Battle Phase (Quick Effect): You can activate 1 of these effects; - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function() return Duel.IsMainPhase() or Duel.IsBattlePhase() end) - e1:SetCost(Cost.Choice( - --● Add 1 "Witchcrafter" Spell from your Deck to your hand - {aux.TRUE,aux.Stringid(id,2),function(e,tp) return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end}, - --● Reveal 1 "Witchcrafter" Normal or Quick-Play Spell in your hand; apply that Spell's activation effect - {Cost.Reveal(s.revealfilter,nil,1,1,function(e,tp,og) e:GetChainData().revealed_card=og:GetFirst() end),aux.Stringid(id,3),nil} - ) - ) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e1) - --During your End Phase: You can return 1 of your banished "Witchcrafter" cards 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_O) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e2:SetTarget(s.rtgtg) - e2:SetOperation(s.rtgop) - c:RegisterEffect(e2) -end -s.listed_series={SET_WITCHCRAFTER} -s.material_setcode=SET_WITCHCRAFTER -function s.thfilter(c) - return c:IsSetCard(SET_WITCHCRAFTER) and c:IsSpell() and c:IsAbleToHand() -end -function s.revealfilter(c) - return c:IsSetCard(SET_WITCHCRAFTER) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) - and c:CheckActivateEffect(true,true,false)~=nil - and c:CheckActivateEffect(true,true,false):GetOperation()~=nil -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local cd=e:GetChainData() - if cd.cost_choice==1 then - --● Add 1 "Witchcrafter" Spell from your Deck to your hand - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - elseif cd.cost_choice==2 then - --● Reveal 1 "Witchcrafter" Normal or Quick-Play Spell in your hand; apply that Spell's activation effect - e:SetCategory(0) - local te,ceg,cep,cev,cre,cr,crp=cd.revealed_card:CheckActivateEffect(true,true,true) - Duel.ClearTargetCard() - local tg=te:GetTarget() - e:SetProperty(te:GetProperty()) - e:SetLabel(te:GetLabel()) - e:SetLabelObject(te:GetLabelObject()) - if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end - e:SetCategory(0) - Duel.ClearOperationInfo(0) - cd.pupils_target_effect=te - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local cd=e:GetChainData() - if cd.cost_choice==1 then - --● Add 1 "Witchcrafter" Spell from your Deck to your hand - 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 - elseif cd.cost_choice==2 then - --● Reveal 1 "Witchcrafter" Normal or Quick-Play Spell in your hand; apply that Spell's activation effect - local te=cd.pupils_target_effect - if not te then return end - local op=te:GetOperation() - if op then - op(e,tp,eg,ep,ev,re,r,rp) - end - end -end -function s.rtgfilter(c) - return c:IsSetCard(SET_WITCHCRAFTER) and c:IsFaceup() and c:IsAbleToGrave() -end -function s.rtgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rtgfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED) -end -function s.rtgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.rtgfilter,tp,LOCATION_REMOVED,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoGrave(g,REASON_EFFECT) - end -end diff --git a/pre-release/c100455027.lua b/pre-release/c100455027.lua deleted file mode 100644 index 5997da6221..0000000000 --- a/pre-release/c100455027.lua +++ /dev/null @@ -1,97 +0,0 @@ ---ウィッチクラフト・セレブレーション ---Witchcrafter Celebration ---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) - 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 your End Phase, if you control a "Witchcrafter" monster, while this card is in your GY: You can add this card to your 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:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WITCHCRAFTER),tp,LOCATION_MZONE,0,1,nil) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_WITCHCRAFTER} -function s.desfilter(c,opp) - return (c:IsSetCard(SET_WITCHCRAFTER) and c:IsMonster() and c:IsFaceup()) or c:IsControler(opp) -end -function s.matfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToDeck() and c:IsFaceup() -end -function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(aux.NecroValleyFilter(s.matfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,1-tp) - --● Destroy 1 "Witchcrafter" monster you control and 1 card your opponent controls - local b1=#g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),0) - --● Fusion Summon 1 "Witchcrafter" Fusion Monster from your Extra Deck, by shuffling Spellcaster monsters from your GY and/or banishment into the Deck - local fusion_params={ - fusfilter=function(c) return c:IsSetCard(SET_WITCHCRAFTER) end, - matfilter=aux.FALSE, - extrafil=s.fextra, - extraop=Fusion.ShuffleMaterial - } - local b2=Fusion.SummonEffTG(fusion_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,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_DESTROY) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,0) - elseif op==2 then - e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,1) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Destroy 1 "Witchcrafter" monster you control and 1 card your opponent controls - local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,1-tp) - if #g<2 or g:GetClassCount(Card.GetControler)<2 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_DESTROY) - if #sg==2 then - Duel.HintSelection(sg) - Duel.Destroy(sg,REASON_EFFECT) - end - elseif op==2 then - --● Fusion Summon 1 "Witchcrafter" Fusion Monster from your Extra Deck, by shuffling Spellcaster monsters from your GY and/or banishment into the Deck - local fusion_params={ - fusfilter=function(c) return c:IsSetCard(SET_WITCHCRAFTER) end, - matfilter=aux.FALSE, - extrafil=s.fextra, - extraop=Fusion.ShuffleMaterial - } - Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) - 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,chk) - 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/c100455028.lua b/pre-release/c100455028.lua deleted file mode 100644 index 02d9a8a290..0000000000 --- a/pre-release/c100455028.lua +++ /dev/null @@ -1,61 +0,0 @@ ---魔女の聖夜行 ---Witchcrafter Walpurgis ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --During your Main Phase: You can add 1 "Witchcrafter" monster from your Deck to your hand, then discard 1 card. You can only use this effect of "Witchcrafter Walpurgis" once per turn - 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_FZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --During your turn, if you would discard to activate the effect of a "Witchcrafter" monster you control, you can send 1 "Witchcrafter" Spell/Trap from your Deck to the GY instead, except "Witchcrafter Walpurgis" - local e2=Witchcrafter.CreateCostReplaceEffect(c) - e2:SetRange(LOCATION_FZONE) - e2:SetCondition(s.repcon) - e2:SetOperation(s.repop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_WITCHCRAFTER} -function s.thfilter(c) - return c:IsSetCard(SET_WITCHCRAFTER) 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) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,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.repcostfilter(c) - return c:IsSetCard(SET_WITCHCRAFTER) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToGraveAsCost() -end -function s.repcon(e) - local tp=e:GetHandlerPlayer() - return Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(s.repcostfilter,tp,LOCATION_DECK,0,1,nil) -end -function s.repop(base,extracon,e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.repcostfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_COST) - end -end diff --git a/pre-release/c100455029.lua b/pre-release/c100455029.lua deleted file mode 100644 index 4484e74821..0000000000 --- a/pre-release/c100455029.lua +++ /dev/null @@ -1,69 +0,0 @@ ---ウィッチクラフト・ディストーション ---Witchcrafter Distortion -local s,id=GetID() -function s.initial_effect(c) - --When a Spell/Trap Card, or monster effect, is activated and you control a Level 5 or higher "Witchcrafter" monster: Negate the activation, and if you do, destroy that card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.negcon) - e1:SetTarget(s.negtg) - e1:SetOperation(s.negop) - c:RegisterEffect(e1) - --If this card is in your GY, except the turn it was sent there: You can banish it; add 1 Level 5 or higher Spellcaster monster from your Deck to your hand, 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_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(aux.exccon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_WITCHCRAFTER} -function s.negconfilter(c) - return c:IsLevelAbove(5) and c:IsSetCard(SET_WITCHCRAFTER) and c:IsFaceup() -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.negconfilter,tp,LOCATION_MZONE,0,1,nil) and (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsMonsterEffect()) - and Duel.IsChainNegatable(ev) -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 -function s.thfilter(c) - return c:IsLevelAbove(5) and c:IsRace(RACE_SPELLCASTER) 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 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) - end -end \ No newline at end of file diff --git a/pre-release/c100455047.lua b/pre-release/c100455047.lua deleted file mode 100644 index 85de65c112..0000000000 --- a/pre-release/c100455047.lua +++ /dev/null @@ -1,114 +0,0 @@ ---破械式鬼シャラ ---Unchained Ogre Shara ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --During the Main Phase (Quick Effect): You can discard this card; Special Summon 1 Fiend monster from your hand, then destroy 1 card you control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.handsptg) - e1:SetOperation(s.handspop) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e1) - --If a card(s) on the field is destroyed by card effect, except "Unchained Ogre Shara", or by battle, while this card is in your GY: You can Special Summon this card (but place it on the bottom of the Deck when it leaves the field) or add it to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.selfspthcon) - e2:SetTarget(s.selfspthtg) - e2:SetOperation(s.selfspthop) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.handspfilter(c,e,tp) - return c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.handsptg(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 Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,c,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) - if #g>0 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - end -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 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil) - if #dg>0 then - Duel.HintSelection(dg) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end -end -function s.selfspthconfilter(c) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE|REASON_EFFECT) -end -function s.selfspthcon(e,tp,eg,ep,ev,re,r,rp) - if eg:IsContains(e:GetHandler()) or not eg:IsExists(s.selfspthconfilter,1,nil) then return false end - if r&REASON_BATTLE>0 then return true end - if Duel.IsChainSolving() then - local rc=re:GetHandler() - if rc:IsRelateToEffect(re) and rc:IsFaceup() then - return not rc:IsCode(id) - else - local code1,code2=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2) - return code1~=id and code2~=id - end - else - if re then - return not re:GetHandler():IsCode(id) - else - return not eg:GetFirst():IsPreviousCodeOnField(id) - end - end - return false -end -function s.selfspthtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.selfspthop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - aux.ToHandOrElse(c,tp, - function() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - end, - function() - if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --Place it on the bottom of the Deck when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_DECKBOT) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - c:RegisterEffect(e1,true) - end - end, - aux.Stringid(id,3) - ) -end \ No newline at end of file diff --git a/pre-release/c100455048.lua b/pre-release/c100455048.lua deleted file mode 100644 index 2cba4eccd9..0000000000 --- a/pre-release/c100455048.lua +++ /dev/null @@ -1,109 +0,0 @@ ---破械式鬼シュマ ---Unchained Ogre Shma ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is Normal Summoned: You can Special Summon 1 Level 4 or lower "Unchained" monster from your Deck, except "Unchained Ogre Shma", then destroy 1 card you control, also you cannot Special Summon for the rest of this turn, except Fiend monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - 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.lv4sptg) - e1:SetOperation(s.lv4spop) - c:RegisterEffect(e1) - --If this card on the field is destroyed by card effect, except "Unchained Ogre Shma", or by battle: You can Special Summon 1 "Unchained" monster from your hand or Deck, except "Unchained Ogre Shma" - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.handdeckspcon) - e2:SetTarget(s.handdecksptg) - e2:SetOperation(s.handdeckspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_UNCHAINED} -s.listed_names={id} -function s.lv4spfilter(c,e,tp) - return c:IsLevelBelow(4) and s.unchainedspfilter(c,e,tp) -end -function s.unchainedspfilter(c,e,tp) - return c:IsSetCard(SET_UNCHAINED) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.lv4sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.lv4spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.lv4spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.lv4spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil) - if #dg>0 then - Duel.HintSelection(dg) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end - end - local c=e:GetHandler() - --You cannot Special Summon for the rest of this turn, except Fiend 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:IsRaceExcept(RACE_FIEND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_FIEND) end) -end -function s.handdeckspcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not (c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE|REASON_EFFECT)) then return false end - if c:IsReason(REASON_BATTLE) then - return true - elseif c:IsReason(REASON_EFFECT) then - local rc=re:GetHandler() - if Duel.IsChainSolving() then - if rc==c then - return not c:IsPreviousCodeOnField(id) - else - if rc:IsRelateToEffect(re) and rc:IsFaceup() then - return not rc:IsCode(id) - else - local code1,code2=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2) - return code1~=id and code2~=id - end - end - else - return not rc:IsCode(id) - end - end - return false -end -function s.handdecksptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.unchainedspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) -end -function s.handdeckspop(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.unchainedspfilter,tp,LOCATION_HAND|LOCATION_DECK,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/c100455049.lua b/pre-release/c100455049.lua deleted file mode 100644 index 2f2b3bd790..0000000000 --- a/pre-release/c100455049.lua +++ /dev/null @@ -1,101 +0,0 @@ ---破械冥官カムラ ---Unchained Malevolent Magistrate Kamura ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can target up to 3 cards you control; destroy them, and if you do, Special Summon this card from your hand, then you can apply any of the following effects, in sequence, based on the original types of the destroyed cards - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW+CATEGORY_POSITION) - 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) - --If this card on the field is destroyed by card effect: You can destroy all monsters on the field - 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) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.descon) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and Duel.GetMZoneCount(tp,chkc)>0 end - local c=e:GetHandler() - local mmz_rescon=aux.ChkfMMZ(1) - local g=Duel.GetTargetGroup(nil,tp,LOCATION_ONFIELD,0,nil) - if chk==0 then return #g>0 and aux.SelectUnselectGroup(g,e,tp,1,3,mmz_rescon,0) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - local tg=aux.SelectUnselectGroup(g,e,tp,1,3,mmz_rescon,1,tp,HINTMSG_DESTROY,mmz_rescon) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,#tg,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - if tg:IsExists(Card.IsMonsterCard,1,nil) then - Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - end - if tg:IsExists(Card.IsSpellCard,1,nil) then - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_EITHER,LOCATION_MZONE) - end - if tg:IsExists(Card.IsTrapCard,1,nil) then - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) - end -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==0 or Duel.Destroy(tg,REASON_EFFECT)==0 then return end - local c=e:GetHandler() - local og=Duel.GetOperatedGroup() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --● Monster: Draw 1 card - if og:IsExists(Card.IsMonsterCard,1,nil) and Duel.IsPlayerCanDraw(tp,1) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end - --● Spell: Change the battle position of 1 monster on the field - if og:IsExists(Card.IsSpellCard,1,nil) and Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local g=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end - end - --● Trap: Destroy 1 other card on the field - if og:IsExists(Card.IsTrapCard,1,nil) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) - and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end - end - end -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 end - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/pre-release/c100455050.lua b/pre-release/c100455050.lua deleted file mode 100644 index 17516915d1..0000000000 --- a/pre-release/c100455050.lua +++ /dev/null @@ -1,100 +0,0 @@ ---破械焔魔天ヤマ ---Unchained Enma Lord Yama ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ monsters, including an "Unchained Soul" monster - Link.AddProcedure(c,nil,2,4,s.matcheck) - --During your End Phase: You can target up to 2 Fiend monsters in your GY that were destroyed and sent there this turn; Special Summon them, but you cannot Special Summon, except Fiend monsters, while you control either of those face-up monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If this card on the field would be destroyed by battle or card effect, you can destroy 1 face-up card on either field 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,1}) - e2:SetTarget(s.desreptg) - e2:SetOperation(s.desrepop) - c:RegisterEffect(e2) -end -s.listed_series={SET_UNCHAINED_SOUL} -s.material_setcode=SET_UNCHAINED_SOUL -function s.matcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,SET_UNCHAINED_SOUL,lc,sumtype,tp) -end -function s.spfilter(c,e,tp,turn_count) - return c:IsRace(RACE_FIEND) and c:IsReason(REASON_DESTROY) and c:GetTurnID()==turn_count and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local turn_count=Duel.GetTurnCount() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp,turn_count) end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return ft>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,turn_count) end - ft=math.min(ft,2) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp,turn_count) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==0 or (#tg==2 and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)) then return end - if #tg==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - tg=tg:FilterSelect(tp,Card.IsCanBeSpecialSummoned,1,1,nil,e,0,tp,false,false) - else - for tc in tg:Iter() do - if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) - --ou cannot Special Summon, except Fiend monsters, while you control either of those face-up monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetRange(LOCATION_MZONE) - e1:SetAbsoluteRange(tp,1,0) - e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) - e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_FIEND) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - end - Duel.SpecialSummonComplete() - end -end -function s.repfilter(c,e) - return c:IsFaceup() and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED|STATUS_BATTLE_DESTROYED) -end -function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,e) end - if Duel.SelectEffectYesNo(tp,c,96) then - Duel.Hint(HINT_CARD,0,id) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local tc=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c,e):GetFirst() - Duel.HintSelection(tc) - e:SetLabelObject(tc) - tc:SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - else - return false - end -end -function s.desrepop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetLabelObject() - tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) -end \ No newline at end of file diff --git a/pre-release/c100455051.lua b/pre-release/c100455051.lua deleted file mode 100644 index 6ab0509dae..0000000000 --- a/pre-release/c100455051.lua +++ /dev/null @@ -1,114 +0,0 @@ ---破械神雙ラギア ---Unchained Soul Rage Abominator ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ monsters, including a Fiend monster - Link.AddProcedure(c,nil,2,3,s.matcheck) - --If your opponent Special Summons a monster(s) face-up: You can target 1 of them; destroy 1 Fiend monster you control, and if you do, negate the targeted monster's effects until the end of this turn - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1a:SetCode(EVENT_CUSTOM+id) - e1a:SetRange(LOCATION_MZONE) - e1a:SetCountLimit(1,{id,0}) - e1a:SetTarget(s.distg) - e1a:SetOperation(s.disop) - e1a:SetLabelObject(Group.CreateGroup()) - c:RegisterEffect(e1a) - --Keep track of monsters the opponent Special Summoned face-up - local e1b=Effect.CreateEffect(c) - e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - e1b:SetRange(LOCATION_MZONE) - e1b:SetLabelObject(e1a) - e1b:SetOperation(s.regop) - c:RegisterEffect(e1b) - --When a monster effect is activated on the field and you control a Link-4 or higher "Unchained" Link Monster (Quick Effect): You can banish this card from your GY; destroy the monster that activated that effect - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.descon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_UNCHAINED} -function s.matcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsRace,1,nil,RACE_FIEND,lc,sumtype,tp) -end -function s.disfilter(c,e,opp) - return c:IsSummonPlayer(opp) and c:IsNegatableMonster() and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_MZONE) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsDamageStep() then return end - local tg=eg:Filter(s.disfilter,nil,e,1-tp) - if #tg>0 then - for tc in tg:Iter() do - tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) - end - local g=e:GetLabelObject():GetLabelObject() - if Duel.GetCurrentChain()==0 then g:Clear() end - g:Merge(tg) - g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) - e:GetLabelObject():SetLabelObject(g) - Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) - end -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local opp=1-tp - local g=e:GetLabelObject():Filter(s.disfilter,nil,e,opp) - if chkc then return g:IsContains(chkc) and s.disfilter(chkc,e,opp) end - local dg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_FIEND),tp,LOCATION_MZONE,0,nil) - if chk==0 then return #dg>0 and #g>0 end - local tc=nil - if #g>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - tc=g:Select(tp,1,1,nil):GetFirst() - else - tc=g:GetFirst() - end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsRace,RACE_FIEND),tp,LOCATION_MZONE,0,1,1,nil) - if #g==0 then return end - Duel.HintSelection(g) - if Duel.Destroy(g,REASON_EFFECT)==0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - --Negate the targeted monster's effects until the end of this turn - tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) - end -end -function s.desconfilter(c) - return c:IsLinkAbove(4) and c:IsSetCard(SET_UNCHAINED) and c:IsFaceup() -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return re:IsMonsterEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE and re:GetHandler():IsRelateToEffect(re) - and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=re:GetHandler() - rc:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,rc,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if rc:IsRelateToEffect(re) then - Duel.Destroy(rc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100455052.lua b/pre-release/c100455052.lua deleted file mode 100644 index 7a9dc4af06..0000000000 --- a/pre-release/c100455052.lua +++ /dev/null @@ -1,77 +0,0 @@ ---破械転生 ---Reincarnation of the Unchained ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: You can add 1 "Unchained" Spell (except "Reincarnation of the Unchained") or 1 "Abomination's Prison" 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_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) - --Once per turn: You can target up to 3 "Unchained" cards in your GY, except "Reincarnation of the Unchained"; shuffle them into the Deck, then you can destroy other cards you control up to the number returned - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) -end -s.listed_series={SET_UNCHAINED} -s.listed_names={27412542,id} --"Abomination's Prison" -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thfilter(c) - return ((c:IsSetCard(SET_UNCHAINED) and c:IsSpell() and not c:IsCode(id)) or c:IsCode(27412542)) and c:IsAbleToHand() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if 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 g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.tdfilter(c) - return c:IsSetCard(SET_UNCHAINED) and not c:IsCode(id) and c:IsAbleToDeck() -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.tdfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,3,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD) -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_DECKSHUFFLE,REASON_EFFECT)>0 then - Duel.ShuffleDeck(tp) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - local returned_count=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) - if returned_count>0 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,exc) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,returned_count,exc) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c100455053.lua b/pre-release/c100455053.lua deleted file mode 100644 index 526d411cf9..0000000000 --- a/pre-release/c100455053.lua +++ /dev/null @@ -1,81 +0,0 @@ ---破械習合 ---Unchained Syncretism ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Target 2 face-up monsters on the field, including an "Unchained Soul" Link Monster you control; immediately after this effect resolves, Link Summon 1 Fiend monster using only those 2 monsters - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.linksumtg) - e1:SetOperation(s.linksumop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --If this Set card is destroyed by card effect: You can Special Summon 1 "Unchained" monster from your Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.deckspcon) - e2:SetTarget(s.decksptg) - e2:SetOperation(s.deckspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_UNCHAINED_SOUL,SET_UNCHAINED} -function s.unchainedsoulfilter(c,tp) - return c:IsSetCard(SET_UNCHAINED_SOUL) and c:IsLinkMonster() and c:IsControler(tp) -end -function s.linkfilter(c,mg) - return c:IsRace(RACE_FIEND) and c:IsLinkSummonable(nil,mg,2,2) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(s.unchainedsoulfilter,1,nil,tp) and Duel.IsExistingMatchingCard(s.linkfilter,tp,LOCATION_EXTRA,0,1,nil,sg) -end -function s.linksumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetTargetGroup(aux.FaceupFilter(Card.IsCanBeLinkMaterial),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_TARGET) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.linkmatimmunefilter(c,e) - return c:IsFaceup() and c:IsCanBeLinkMaterial() and not c:IsImmuneToEffect(e) -end -function s.linksumop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e):Match(s.linkmatimmunefilter,nil,e) - if #tg==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local link=Duel.SelectMatchingCard(tp,s.linkfilter,tp,LOCATION_EXTRA,0,1,1,nil,tg):GetFirst() - if link then - Duel.LinkSummon(tp,link,tg,tg,2,2) - end - end -end -function s.deckspcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) and c:IsReason(REASON_EFFECT) -end -function s.deckspfilter(c,e,tp) - return c:IsSetCard(SET_UNCHAINED) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.deckspop(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.deckspfilter,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 \ No newline at end of file diff --git a/pre-release/c100456001.lua b/pre-release/c100456001.lua deleted file mode 100644 index ea7a85a8e0..0000000000 --- a/pre-release/c100456001.lua +++ /dev/null @@ -1,72 +0,0 @@ ---ダークティラノ ---Dark Tyranno ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Can attack directly if all monsters your opponent controls are in Defense Position - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetCondition(s.directattackcond) - c:RegisterEffect(e1) - --During your Main Phase, if a Spell Card or effect was activated this turn: You can 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(function() return Duel.GetCustomActivityCount(id,0,ACTIVITY_CHAIN)>0 or Duel.GetCustomActivityCount(id,1,ACTIVITY_CHAIN)>0 end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsSpellEffect() end) - --If this card is sent to the GY: You can add 1 Level 8 or higher Dinosaur monster from your Deck to your hand, then you can Special Summon it if your opponent controls a monster - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+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.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -function s.directattackcond(e) - local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),0,LOCATION_MZONE) - return #g==g:FilterCount(Card.IsDefensePos,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:IsLevelAbove(8) and c:IsRace(RACE_DINOSAUR) 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_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -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 then - Duel.ConfirmCards(1-tp,sc) - Duel.ShuffleHand(tp) - if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100456002.lua b/pre-release/c100456002.lua deleted file mode 100644 index 94d4b5f369..0000000000 --- a/pre-release/c100456002.lua +++ /dev/null @@ -1,94 +0,0 @@ ---アルカナフォースⅩⅡ-THE HANGED MAN ---Arcana Force XII - The Hangman ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --When a card or effect is activated (Quick Effect): You can reveal this card in your hand; Special Summon 1 "Arcana Force" monster from your hand in Defense Position. You can only use this effect of "Arcana Force XII - The Hangman" once per turn - 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_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If this card is Summoned: Toss a coin - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_COIN+CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetTarget(s.cointg) - e2a:SetOperation(s.coinop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_FLIP_SUMMON_SUCCESS) - c:RegisterEffect(e2b) - local e2c=e2b:Clone() - e2c:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2c) -end -s.listed_series={SET_ARCANA_FORCE} -s.toss_coin=true -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ARCANA_FORCE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -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_DEFENSE) - end -end -function s.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) - if g:GetClassCount(Card.GetControler)==2 or Duel.IsPlayerAffectedByEffect(tp,CARD_LIGHT_BARRIER) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_MZONE) - Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_EITHER,0) -end -function s.coinop(e,tp,eg,ep,ev,re,r,rp) - local coin=nil - if Duel.IsPlayerAffectedByEffect(tp,CARD_LIGHT_BARRIER) then - local b1=Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,nil) - local b2=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) - local op=Duel.SelectEffect(tp, - {b1,aux.GetCoinEffectHintString(COIN_HEADS)}, - {b2,aux.GetCoinEffectHintString(COIN_TAILS)}) - if not op then return end - coin=op==1 and COIN_HEADS or COIN_TAILS - else - coin=Duel.TossCoin(tp,1) - end - if coin==COIN_HEADS then - --● Heads: Destroy 1 monster you control, and if you do, take damage equal to its original ATK - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sc=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - if Duel.Destroy(sc,REASON_EFFECT)>0 then - Duel.Damage(tp,sc:GetTextAttack(),REASON_EFFECT) - end - elseif coin==COIN_TAILS then - --● Tails: Destroy 1 monster your opponent controls, and if you do, inflict damage to your opponent equal to its original ATK - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sc=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - if Duel.Destroy(sc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,sc:GetTextAttack(),REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c100456003.lua b/pre-release/c100456003.lua deleted file mode 100644 index 4fe408beaa..0000000000 --- a/pre-release/c100456003.lua +++ /dev/null @@ -1,82 +0,0 @@ ---光幻獣 カンデラード ---Candelato, the Beast of Light ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Gains 1000 ATK/DEF for each card in your hand - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_SINGLE) - e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1a:SetCode(EFFECT_UPDATE_ATTACK) - e1a:SetRange(LOCATION_MZONE) - e1a:SetValue(function(e,c) return 1000*Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0) end) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e1b) - --You can discard 2 other cards; Special Summon this card from your hand, then you can add 1 card from your Deck to your hand that has a coin tossing effect - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(Cost.Discard(nil,true,2)) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --When a card or effect is activated that includes an effect that adds a card(s) from the Deck to the hand (Quick Effect): You can negate that effect - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.discon) - e3:SetTarget(s.distg) - e3:SetOperation(s.disop) - c:RegisterEffect(e3) -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_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thfilter(c) - return c.toss_coin 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 - 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 g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,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.discon(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsChainDisablable(ev) then return false end - if re:IsHasCategory(CATEGORY_SEARCH) or re:IsHasCategory(CATEGORY_DRAW) then return true end - local found_opinfo,group_opinfo,_,_,locations_opinfo=Duel.GetOperationInfo(ev,CATEGORY_TOHAND) - local found_popinfo,group_popinfo,_,_,locations_popinfo=Duel.GetPossibleOperationInfo(ev,CATEGORY_TOHAND) - if not (found_opinfo or found_popinfo) then return false end - local g=Group.CreateGroup() - if group_opinfo then g:Merge(group_opinfo) end - if group_popinfo then g:Merge(group_popinfo) end - return (((locations_opinfo or 0)|(locations_popinfo or 0))&LOCATION_DECK)>0 or (#g>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK)) -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) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) -end \ No newline at end of file diff --git a/pre-release/c100456004.lua b/pre-release/c100456004.lua deleted file mode 100644 index 2ba2793cae..0000000000 --- a/pre-release/c100456004.lua +++ /dev/null @@ -1,83 +0,0 @@ ---プラズマ戦士エイトム ---Plasma Warrior Eitom ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustBeSpecialSummoned() - --Must be Special Summoned (from your hand or GY) by Tributing 1 Level 7 or higher monster. You can only Special Summon "Plasma Warrior Eitom" once per turn this way - 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_HAND|LOCATION_GRAVE) - e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e0:SetCondition(s.spcon) - e0:SetTarget(s.sptg) - e0:SetOperation(s.spop) - c:RegisterEffect(e0) - --Once per turn: You can send 1 "Magnet Warrior" or "Magna Warrior" monster from your Deck to the GY, except "Plasma Warrior Eitom"; for the rest of this turn, this card's original ATK becomes 1500, also it can attack directly - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCondition(function(e) local c=e:GetHandler() return not (c:IsBaseAttack(1500) and c:IsHasEffect(EFFECT_DIRECT_ATTACK)) end) - e1:SetCost(s.atkcost) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) -end -s.listed_series={SET_MAGNET_WARRIOR,SET_MAGNA_WARRIOR} -s.listed_names={id} -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.CheckReleaseGroup(tp,Card.IsLevelAbove,1,false,1,true,c,tp,nil,false,nil,7) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsLevelAbove,1,1,false,true,true,c,nil,nil,false,nil,7) - if g and #g>0 then - e:SetLabelObject(g) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if g then - Duel.Release(g,REASON_COST) - end -end -function s.atkcostfilter(c) - return c:IsSetCard({SET_MAGNET_WARRIOR,SET_MAGNA_WARRIOR}) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToGraveAsCost() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.atkcostfilter,tp,LOCATION_DECK,0,1,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.atkcostfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - if c:IsFaceup() then - --For the rest of this turn, this card's original ATK becomes 1500 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(1500) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) - end - --Also it can attack directly - local e2=Effect.CreateEffect(c) - e2:SetDescription(3205) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e2) - end -end \ No newline at end of file diff --git a/pre-release/c100456005.lua b/pre-release/c100456005.lua deleted file mode 100644 index e6b88656bd..0000000000 --- a/pre-release/c100456005.lua +++ /dev/null @@ -1,125 +0,0 @@ ---白騎士団のロード ---White Knight Lord ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --You can banish 3 monsters from your GY; Special Summon this card from your hand, then you can apply 1 of these effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --When an attack is declared involving this card and an opponent's monster: Change that opponent's monster's ATK to 0 - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.atkcon) - e2:SetTarget(s.atktg) - e2:SetOperation(s.atkop) - c:RegisterEffect(e2) - --If this card in its owner's possession is destroyed by an opponent's card: Inflict 1000 damage to your opponent - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_DAMAGE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_DESTROYED) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) end) - e3:SetTarget(s.damtg) - e3:SetOperation(s.damop) - c:RegisterEffect(e3) -end -s.listed_series={SET_WHITE_KNIGHT_NIGHT} -s.listed_names={49306994} --"White Veil" -function s.spcostfilter(c) - return c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) - if chk==0 then return #g>=3 and aux.SelectUnselectGroup(g,e,tp,3,3,aux.ChkfMMZ(1),0) end - local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) - Duel.Remove(sg,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) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_WHITE_KNIGHT_NIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.thfilter(c) - return c:IsCode(49306994) 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 b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) - local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - if not ((b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(id,3))) then return end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,4)}, - {b2,aux.Stringid(id,5)}) - if op==1 then - --● Special Summon 1 "White Knight" or "White Night" monster from your hand or Deck - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - --● Add 1 "White Veil" from your Deck to your hand - 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.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end - end -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - return bc and bc:IsFaceup() and bc:IsControler(1-tp) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local bc=e:GetHandler():GetBattleTarget() - e:SetLabelObject(bc) - bc:CreateEffectRelation(e) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetLabelObject() - if bc and bc:IsRelateToEffect(e) and bc:IsFaceup() and bc:IsControler(1-tp) then - --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) - e1:SetValue(0) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - bc:RegisterEffect(e1) - end -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -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/c100456006.lua b/pre-release/c100456006.lua deleted file mode 100644 index a5da627ee1..0000000000 --- a/pre-release/c100456006.lua +++ /dev/null @@ -1,94 +0,0 @@ ---不死のデスロード ---Invincible Demise Lord ---scripted by pyrQ -local s,id=GetID() -local CARD_SLASH_DRAW=71344451 -function s.initial_effect(c) - --During the End Phase, if a monster(s) was destroyed by battle this turn: You can Special Summon this card from your hand or GY, and if "Invincible Demise Lord" was destroyed by battle this turn, this card's original ATK becomes 3000, also it cannot be destroyed by card effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function() return Duel.HasFlagEffect(0,id) end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --During your Main Phase: You can reveal cards in your Deck, including "Slash Draw", equal to the number of cards your opponent controls +1 and place those revealed cards on top of the Deck in any order - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) - --Keep track of monsters destroyed by battle - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_BATTLE_DESTROYED) - ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) - if eg:IsExists(Card.IsPreviousCodeOnField,1,nil,id) then - Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) - end - end) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_names={id,CARD_SLASH_DRAW} -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.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - and Duel.HasFlagEffect(1,id) then - --If "Invincible Demise Lord" was destroyed by battle this turn, this card's original ATK becomes 3000, also it cannot be destroyed by card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(3000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetDescription(3001) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetValue(1) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local deck_count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - return deck_count>1 and deck_count>=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)+1 - and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,CARD_SLASH_DRAW) - end -end -function s.rescon(sg,e,tp,mg) - local res=sg:IsExists(Card.IsCode,1,nil,CARD_SLASH_DRAW) - return res,not res -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,CARD_SLASH_DRAW) then return end - local reveal_count=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)+1 - local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0) - if #g1 then Duel.SortDecktop(tp,tp,reveal_count) end - end -end \ No newline at end of file diff --git a/pre-release/c100456007.lua b/pre-release/c100456007.lua deleted file mode 100644 index 5115f30d7d..0000000000 --- a/pre-release/c100456007.lua +++ /dev/null @@ -1,65 +0,0 @@ ---E・HERO クレイ・ガードマン ---Elemental HERO Clay Guardian ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Elemental HERO" monster + 1 Warrior monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ELEMENTAL_HERO),aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR)) - --If this card is Special Summoned: You can Special Summon 1 "Elemental HERO" monster from your Deck, then if your opponent controls a card, you can inflict 400 damage to your opponent for each, 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_SPECIAL_SUMMON+CATEGORY_DAMAGE) - 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.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Other "Elemental HERO" monsters you control cannot be destroyed by battle or card effects - local e2a=Effect.CreateEffect(c) - e2a:SetType(EFFECT_TYPE_FIELD) - e2a:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2a:SetRange(LOCATION_MZONE) - e2a:SetTargetRange(LOCATION_MZONE,0) - e2a:SetTarget(function(e,c) return c:IsSetCard(SET_ELEMENTAL_HERO) and c~=e:GetHandler() end) - e2a:SetValue(1) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2b) -end -s.listed_series={SET_HERO,SET_ELEMENTAL_HERO} -s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ELEMENTAL_HERO) 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) - Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400*Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - local dam=400*Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) - Duel.BreakEffect() - Duel.Damage(1-tp,dam,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(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 c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_HERO) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c100456008.lua b/pre-release/c100456008.lua deleted file mode 100644 index f43f0236b6..0000000000 --- a/pre-release/c100456008.lua +++ /dev/null @@ -1,71 +0,0 @@ ---ドールハンマー ---Doll Hammer ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Target 1 monster you control; destroy it, and if you do, draw 2 cards, then you can change the battle position of 1 monster your opponent controls - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --If a monster(s) is Special Summoned from your GY while this card is in your GY: You can add this card to your 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_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.thcon) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -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) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsPlayerCanDraw(tp,2) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,0) -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.Draw(tp,2,REASON_EFFECT)>0 - and Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,0,LOCATION_MZONE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSITION) - local g=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) - end - end -end -function s.thconfilter(c,tp) - return c:IsSummonLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return 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/c100456009.lua b/pre-release/c100456009.lua deleted file mode 100644 index 2629683af7..0000000000 --- a/pre-release/c100456009.lua +++ /dev/null @@ -1,89 +0,0 @@ ---速攻召喚 ---Quick Summon -local s,id=GetID() -function s.initial_effect(c) - --Immediately after this effect resolves, Normal Summon/Set 1 monster. When you do, if your opponent controls a monster, you can Normal Summon a Level 5 or higher monster without Tributing - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SUMMON) - 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, except the turn it was sent there: You can banish it; add 1 Level 5 or higher monster that can be Normal Summoned/Set from your Deck or GY to your hand, then immediately after this effect resolves, Tribute Summon it. You can only use this effect of "Quick Summon" once per turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCondition(aux.exccon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -function s.nsfilter(c,no_tribute_chk,handler) - if c:CanSummonOrSet(true,nil) then return true end - if c:IsLevelAbove(5) and c:IsLocation(LOCATION_HAND) and no_tribute_chk then - --When you do, if your opponent controls a monster, you can Normal Summon a Level 5 or higher monster without Tributing - local e1=Effect.CreateEffect(handler) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(function(e,c,minc) return c==nil or minc==0 end) - c:RegisterEffect(e1) - local res=c:IsSummonable(true,nil) - e1:Reset() - return res - end - return false -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local no_tribute_chk=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,no_tribute_chk,e:GetHandler()) - end - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local no_tribute_chk=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,no_tribute_chk,c):GetFirst() - if not sc then return end - if sc:IsLevelAbove(5) and sc:IsLocation(LOCATION_HAND) and no_tribute_chk then - --When you do, if your opponent controls a monster, you can Normal Summon a Level 5 or higher monster without Tributing - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(function(e,c,minc) return c==nil or minc==0 end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end - Duel.SummonOrSet(tp,sc,true,nil) -end -function s.thfilter(c,tp) - return c:IsLevelAbove(5) and c:IsSummonableCard() and Duel.CheckTribute(c,c:GetTributeRequirement()) and c:CanSummonOrSet(true,nil,1) - and Duel.IsPlayerCanSummon(tp,SUMMON_TYPE_TRIBUTE,c) 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|LOCATION_GRAVE,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() - if not sc then return end - if sc:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(sc) end - if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 then - if sc:IsPreviousLocation(LOCATION_DECK) then Duel.ConfirmCards(1-tp,sc) end - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.SummonOrSet(tp,sc,true,nil,1) - end -end \ No newline at end of file diff --git a/pre-release/c100456010.lua b/pre-release/c100456010.lua deleted file mode 100644 index 10de671a75..0000000000 --- a/pre-release/c100456010.lua +++ /dev/null @@ -1,62 +0,0 @@ ---D-バースト ---D - Burst ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Target 1 face-up Spell you control; destroy it, and if you do, draw 1 card, then if you control a "Destiny HERO" monster, you can Special Summon 1 "Destiny HERO" monster from your hand, GY, or banishment - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW+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.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --At the end of the Damage Step, if a monster equipped with an Equip Card, or "Destiny HERO - Dogma", attacked: You can banish this card from your GY; that monster can 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_series={SET_DESTINY_HERO} -s.listed_names={17132130} --"Destiny HERO - Dogma" -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsSpell() and chkc:IsFaceup() and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSpell),tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsPlayerCanDraw(tp,1) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSpell),tp,LOCATION_ONFIELD,0,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DESTINY_HERO) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -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.Draw(tp,1,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DESTINY_HERO),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.ShuffleHand(tp) - 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,nil,e,tp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local ac=Duel.GetAttacker() - return (ac:HasEquipCard() or ac:IsCode(17132130)) and ac:CanChainAttack() -end \ No newline at end of file diff --git a/pre-release/c100457001.lua b/pre-release/c100457001.lua deleted file mode 100644 index b21bffe0c0..0000000000 --- a/pre-release/c100457001.lua +++ /dev/null @@ -1,85 +0,0 @@ ---古の秘儀 ---Ancient Secrets ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Normal Monster from your hand, Deck, or GY in Defense Position (if you Special Summon from the Deck, it must be Level 4 or lower), or if you control a Normal Monster Card, you can apply 1 of these effects instead - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.acttg) - e1:SetOperation(s.actop) - c:RegisterEffect(e1) -end -function s.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) - and (c:IsLevelBelow(4) or not c:IsLocation(LOCATION_DECK)) -end -function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk) - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - local monster_card_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOriginalType,TYPE_NORMAL),tp,LOCATION_ONFIELD,0,1,nil) - if chk==0 then - if mmz_chk and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) then return true end - return monster_card_chk and (Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 or Duel.IsPlayerCanDraw(tp,2) - or (mmz_chk and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,0,tp,false,false))) - end - if not monster_card_chk then - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_EITHER,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) - Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,1,tp,2) -end -function s.actop(e,tp,eg,ep,ev,re,r,rp) - local op=nil - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOriginalType,TYPE_NORMAL),tp,LOCATION_ONFIELD,0,1,nil) then - local b1=mmz_chk and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) - local b2=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - local b3=Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) - local b4=Duel.IsPlayerCanDraw(tp,2) - local b5=mmz_chk and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(Card.IsCanBeSpecialSummoned),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,0,tp,false,false) - op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}, - {b3,aux.Stringid(id,3)}, - {b4,aux.Stringid(id,4)}, - {b5,aux.Stringid(id,5)}) - else - op=1 - end - if op==1 then - --Special Summon 1 Normal Monster from your hand, Deck, or GY in Defense Position (if you Special Summon from the Deck, it must be Level 4 or lower) - if not mmz_chk then return end - 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,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end - elseif op==2 then - --● Destroy all monsters your opponent controls - local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end - elseif op==3 then - --● Destroy all Spells/Traps your opponent controls - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end - elseif op==4 then - --● Draw 2 cards - Duel.Draw(tp,2,REASON_EFFECT) - elseif op==5 then - --● Special Summon 1 monster from either GY to your field - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsCanBeSpecialSummoned),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100457002.lua b/pre-release/c100457002.lua deleted file mode 100644 index 3c635a57b8..0000000000 --- a/pre-release/c100457002.lua +++ /dev/null @@ -1,96 +0,0 @@ ---デーモンの根源 ---Archfiend's Origin ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is in your hand: You can Tribute 1 other "Archfiend" monster from your hand or field; Special Summon this card - 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) - --If this card is Normal or Special Summoned: You can Special Summon 1 Level 6 Fiend monster with 2500 ATK from your hand, Deck, or GY - 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:SetTarget(s.lv6fiendsptg) - e2a:SetOperation(s.lv6fiendspop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --When your opponent activates a monster effect and you control "Summoned Skull" (Quick Effect): You can negate the activation, and if you do, destroy that card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - 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,2}) - e3:SetCondition(s.negcon) - e3:SetTarget(s.negtg) - e3:SetOperation(s.negop) - c:RegisterEffect(e3) -end -s.listed_series={SET_ARCHFIEND} -s.listed_names={CARD_SUMMONED_SKULL} -function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,true,aux.ReleaseCheckMMZ,c,SET_ARCHFIEND) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,true,aux.ReleaseCheckMMZ,c,SET_ARCHFIEND) - Duel.Release(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.lv6fiendspfilter(c,e,tp) - return c:IsLevel(6) and c:IsRace(RACE_FIEND) and c:IsAttack(2500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.lv6fiendsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.lv6fiendspfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) -end -function s.lv6fiendspop(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.lv6fiendspfilter),tp,LOCATION_HAND|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 -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SUMMONED_SKULL),tp,LOCATION_ONFIELD,0,1,nil) -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/c100457003.lua b/pre-release/c100457003.lua deleted file mode 100644 index 1d1cd76c35..0000000000 --- a/pre-release/c100457003.lua +++ /dev/null @@ -1,73 +0,0 @@ ---魔降雷 ---Makourai, the Lightning Strike ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Target 1 "Archfiend" monster you control; it gains 600 ATK, then you can destroy all monsters your opponent controls with lower original ATK than that monster's ATK - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - c:RegisterEffect(e1) - --During your Main Phase: You can banish this card from your GY, then target 1 Level 6 Fiend monster with 2500 ATK in your GY; add it to your 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:SetCost(Cost.SelfBanish) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ARCHFIEND} -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsSetCard(SET_ARCHFIEND) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_ARCHFIEND),tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_ARCHFIEND),tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE) -end -function s.desfilter(c,atk) - return c:GetBaseAttack()=prev_atk and Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil,atk) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil,atk) - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end - end -end -function s.thfilter(c) - return c:IsLevel(6) and c:IsRace(RACE_FIEND) and c:IsAttack(2500) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - 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 -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100457102.lua b/pre-release/c100457102.lua deleted file mode 100644 index 0e92b4a7ca..0000000000 --- a/pre-release/c100457102.lua +++ /dev/null @@ -1,95 +0,0 @@ ---聖なる心のバリア -マインドフォース- ---Mind Mirror Force ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If your opponent controls 5 or more face-up cards, this card's activation and effect cannot be negated, also you can activate this card the turn it was Set - c:RegisterFlagEffect(id,0,0,1) - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD) - ge1:SetCode(EFFECT_CANNOT_INACTIVATE) - ge1:SetValue(function(e,ch) - local trig_eff=Chain.GetTriggeringEffect(ch) - local trig_player=Chain.GetTriggeringPlayer(ch) - return trig_eff:GetHandler():HasFlagEffect(id) and Duel.GetMatchingGroupCount(Card.IsFaceup,trig_player,0,LOCATION_ONFIELD,nil)>=5 - end) - Duel.RegisterEffect(ge1,0) - local ge2=ge1:Clone() - ge2:SetCode(EFFECT_CANNOT_DISEFFECT) - Duel.RegisterEffect(ge2,0) - end) - 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:SetCondition(function(e) - return Duel.GetMatchingGroupCount(Card.IsFaceup,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,nil)>=5 - end) - c:RegisterEffect(e0) - --At any of the following timings: Negate the effects of as many face-up cards your opponent controls as possible, and if you do, destroy them, also your monsters cannot attack directly until the end of the next turn after this card resolves - --● When the monster your opponent controls with the highest ATK (even if tied) declares an attack - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,1)) - e1a:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) - e1a:SetType(EFFECT_TYPE_ACTIVATE) - e1a:SetCode(EVENT_ATTACK_ANNOUNCE) - e1a:SetCondition(s.condition1) - e1a:SetTarget(s.target) - e1a:SetOperation(s.activate) - c:RegisterEffect(e1a) - --● When your opponent activates a monster effect that would destroy a card(s) on the field - local e1b=e1a:Clone() - e1b:SetCode(EVENT_CHAINING) - e1b:SetCondition(s.condition2) - c:RegisterEffect(e1b) - --● When your opponent activates a monster effect in the hand or field during your turn - local e1c=e1b:Clone() - e1c:SetCondition(s.condition3) - c:RegisterEffect(e1c) -end -function s.condition1(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetAttacker() - return bc:IsControler(1-tp) and Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack):IsContains(bc) -end -function s.condition2(e,tp,eg,ep,ev,re,r,rp) - --Avoid prompting which effect to activate if both 'condition1' and 'condition2' are true - local event_chk,event_g,event_p,event_v,event_reff,event_r,event_rp=Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE,true) - if event_chk and s.condition1(e,tp,event_g,event_p,event_v,event_reff,event_r,event_rp) then return false end - if not (rp==1-tp and re:IsMonsterEffect()) then return false end - local opinfo_chk,opinfo_g=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) - return opinfo_chk and opinfo_g and opinfo_g:IsExists(Card.IsOnField,1,nil) -end -function s.condition3(e,tp,eg,ep,ev,re,r,rp) - --Avoid prompting which effect to activate if both 'condition2' and 'condition3' are true - if s.condition2(e,tp,eg,ep,ev,re,r,rp) then return false end - return Duel.IsTurnPlayer(tp) and rp==1-tp and re:IsMonsterEffect() and Chain.IsTriggeringLocation(ev,LOCATION_HAND|LOCATION_MZONE) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil):Match(Card.IsCanBeDisabledByEffect,nil,e) - if #g>0 then - for nc in g:Iter() do - --Negate the effects of as many face-up cards your opponent controls as possible, and if you do, destroy them - nc:NegateEffects(c) - end - Duel.AdjustInstantly() - Duel.Destroy(g,REASON_EFFECT) - end - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2),nil,2) - --Your monsters cannot attack directly until the end of the next turn after this card resolves - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE|PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end diff --git a/pre-release/c101304081.lua b/pre-release/c101304081.lua deleted file mode 100644 index 91bfce8642..0000000000 --- a/pre-release/c101304081.lua +++ /dev/null @@ -1,90 +0,0 @@ ---JP name ---Gaming Gamer GG ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 Machine monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),4,2) - --If this card is Special Summoned: You can change all monsters your opponent controls to Attack Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(s.postg) - e1:SetOperation(s.posop) - c:RegisterEffect(e1) - --If your opponent has a monster in their field or GY: You can detach 1 material from this card; send 1 Machine monster from your Deck/Extra Deck to the GY, then you can apply this effect: ● Choose 1 Machine Xyz Monster in your GY, and this card's name becomes that monster's name until the End Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(Card.IsMonster,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end) - e2:SetCost(Cost.DetachFromSelf(1)) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - c:RegisterEffect(e2) -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(aux.AND(Card.IsDefensePos,Card.IsCanChangePosition),tp,0,LOCATION_MZONE,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,tp,POS_FACEUP_ATTACK) -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.AND(Card.IsDefensePos,Card.IsCanChangePosition),tp,0,LOCATION_MZONE,nil) - if #g>0 then - Duel.ChangePosition(g,POS_FACEUP_ATTACK) - end -end -function s.tgfilter(c) - return 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|LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.namefilter(c,current_name) - return c:IsRace(RACE_MACHINE) and c:IsXyzMonster() and not c:IsCode(current_name) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local code=c:GetCode() - 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 c:IsRelateToEffect(e) and c:IsFaceup() - and Duel.IsExistingMatchingCard(s.namefilter,tp,LOCATION_GRAVE,0,1,nil,code) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) - local xyz=Duel.SelectMatchingCard(tp,s.namefilter,tp,LOCATION_GRAVE,0,1,1,nil,code):GetFirst() - if not xyz then return end - Duel.HintSelection(xyz) - Duel.BreakEffect() - --This card's name becomes that monster's name until the End Phase - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(xyz:GetCode()) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - --Reset the card's name manually during the End Phase - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,4)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetOperation(function(e) - e1:Reset() - Duel.HintSelection(c) - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - end) - e2:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e2) - end -end \ No newline at end of file diff --git a/pre-release/c101304082.lua b/pre-release/c101304082.lua deleted file mode 100644 index 86d0064ba8..0000000000 --- a/pre-release/c101304082.lua +++ /dev/null @@ -1,65 +0,0 @@ ---JP name ---Fata Dragna ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2 monsters with the same Type and Attribute, but different Levels - Fusion.AddProcMixN(c,true,true,s.matfilter,2) - --Your opponent cannot target Fusion Monsters you control with card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsFusionMonster() end) - e1:SetValue(aux.tgoval) - c:RegisterEffect(e1) - --If this card is sent to the GY as material for a Fusion Summon: You can Special Summon 1 Fusion Monster from your Extra Deck in Defense Position (but negate its effects, also return it to the Extra Deck during the End Phase), also for the rest of this turn, you cannot Special Summon from the Extra Deck, except Fusion Monsters. You can only use this effect of "Fata Dragna" once per turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_TOEXTRA) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_BE_MATERIAL) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.matfilter(c,fc,sumtype,sump,sub,matg,sg) - return c:HasLevel() and (not sg or sg:FilterCount(aux.TRUE,c)==0 or (sg:IsExists(Card.IsAttribute,1,c,c:GetAttribute(fc,sumtype,sump),fc,sumtype,sump) - and sg:IsExists(Card.IsRace,1,c,c:GetRace(fc,sumtype,sump),fc,sumtype,sump) - and not sg:IsExists(Card.IsLevel,1,c,c:GetLevel()))) -end -function s.spfilter(c,e,tp) - return c:IsFusionMonster() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -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) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then - --Negate its effects - sc:NegateEffects(c) - --Return it to the Extra Deck during the End Phase - aux.DelayedOperation(sc,PHASE_END,id,e,tp,function(ag) Duel.SendtoDeck(ag,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end,nil,0,0,aux.Stringid(id,1)) - end - Duel.SpecialSummonComplete() - --For the rest of this turn, you cannot Special Summon from the Extra Deck, except Fusion 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:IsFusionMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101304083.lua b/pre-release/c101304083.lua deleted file mode 100644 index 3d64c4e2fd..0000000000 --- a/pre-release/c101304083.lua +++ /dev/null @@ -1,97 +0,0 @@ ---JP name ---Shade the Obscure ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --You cannot Pendulum Summon, except Pendulum Monsters (this effect cannot be negated) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetRange(LOCATION_PZONE) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c,tp,sumtype,sumpos) return not c:IsPendulumMonster() and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end) - c:RegisterEffect(e1) - --If a monster(s) with 1000 ATK or less is Special Summoned (except during the Damage Step): You can return this card to the hand. You can only use this effect of "Shade the Obscure" once per turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_PZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(aux.FaceupFilter(Card.IsAttackBelow,1000),1,nil) end) - e2:SetTarget(s.rthtg) - e2:SetOperation(s.rthop) - c:RegisterEffect(e2) - --If you have a card in your Pendulum Zone and this card is in your hand: You can 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_HAND) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)>0 end) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) - --You can pay 1000 LP; destroy 1 Pendulum Monster Card in your hand or face-up field, then you can add 1 Pendulum Monster from your Deck to your face-up Extra Deck - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_TOEXTRA) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,{id,2}) - e4:SetCost(Cost.PayLP(1000)) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) -end -function s.rthtg(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.rthop(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 -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.desfilter(c) - return c:IsOriginalType(TYPE_PENDULUM) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) - if #g==0 then return end - if g:GetFirst():IsOnField() then Duel.HintSelection(g) end - if Duel.Destroy(g,REASON_EFFECT)==0 then return end - local dg=Duel.GetMatchingGroup(aux.AND(Card.IsPendulumMonster,Card.IsAbleToExtra),tp,LOCATION_DECK,0,nil) - if #dg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT) - local sg=dg:Select(tp,1,1,nil) - if #sg>0 then - Duel.BreakEffect() - Duel.SendtoExtraP(sg,tp,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304084.lua b/pre-release/c101304084.lua deleted file mode 100644 index 572d35d11a..0000000000 --- a/pre-release/c101304084.lua +++ /dev/null @@ -1,72 +0,0 @@ ---JP name ---VIP Whale ---scripted by pyrQ -local s,id=GetID() -local COUNTER_VIP=0x21a -function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_VIP) - --You can Tribute additional monsters when you Tribute Summon this card face-up - aux.AddNormalSummonProcedure(c,true,true,2,12,SUMMON_TYPE_TRIBUTE,aux.Stringid(id,0)) - --If this card is Tribute Summoned: You can place VIP Counters on this card equal to the number of monsters Tributed for its Tribute Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsTributeSummoned() end) - e1:SetTarget(s.countertg) - e1:SetOperation(s.counterop) - c:RegisterEffect(e1) - --When your opponent activates a card or effect (Quick Effect): You can remove 1 VIP Counter from this card; toss a coin and call it. If you call it right, negate that effect. If you call it wrong, this card's original ATK becomes halved until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_COIN+CATEGORY_DISABLE+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(Cost.RemoveCounterFromSelf(COUNTER_VIP,1)) - e2:SetTarget(s.cointg) - e2:SetOperation(s.coinop) - c:RegisterEffect(e2) -end -s.counter_place_list={COUNTER_VIP} -s.toss_coin=true -function s.countertg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local trib_monsters_count=c:GetMaterialCount() - if chk==0 then return trib_monsters_count>0 and c:IsCanAddCounter(COUNTER_VIP,trib_monsters_count) end - e:SetLabel(trib_monsters_count) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,trib_monsters_count,tp,COUNTER_VIP) -end -function s.counterop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - c:AddCounter(COUNTER_VIP,e:GetLabel()) - end -end -function s.cointg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) - Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,0) -end -function s.coinop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CallCoin(tp) then - --If you call it right, negate that effect - Duel.NegateEffect(ev) - else - --If you call it wrong, this card's original ATK becomes halved until the end of this turn - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - --This card's original ATK becomes halved until the end of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetValue(c:GetBaseAttack()/2) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304085.lua b/pre-release/c101304085.lua deleted file mode 100644 index 9ddb4e84a4..0000000000 --- a/pre-release/c101304085.lua +++ /dev/null @@ -1,101 +0,0 @@ ---JP name ---Genia of the Ring ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card is in your hand: You can target 1 face-up monster on the field; Special Summon this card, also that target becomes a Spellcaster monster. The next time that target would be destroyed by card effect this turn, it is not destroyed, also you cannot Special Summon from the Extra Deck 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: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) - --If this card is Tributed, or banished, to activate a Spellcaster monster's effect: You can add this card to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_RELEASE) - e2a:SetCountLimit(1,{id,1}) - e2a:SetCondition(s.thcon) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_REMOVE) - c:RegisterEffect(e2b) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - 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 - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - if tc:IsRaceExcept(RACE_SPELLCASTER) then - --That target becomes a Spellcaster monster - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetValue(RACE_SPELLCASTER) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - --The next time that target would be destroyed by card effect this turn, it is not destroyed - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e2:SetCountLimit(1) - e2:SetValue(function(e,re,r,rp) if r&REASON_EFFECT>0 then e:Reset() return true end end) - e2:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e2) - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Spellcaster monsters - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,3)) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetTargetRange(1,0) - e3:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and c:IsRaceExcept(RACE_SPELLCASTER) end) - e3:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e3,tp) -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - if not (e:GetHandler():IsReason(REASON_COST) and re and re:IsActivated() and re:IsMonsterEffect()) then return false end - local rc=re:GetHandler() - if rc:IsRelateToEffect(re) and rc:IsFaceup() then - return rc:IsRace(RACE_SPELLCASTER) - else - return Duel.GetChainInfo(0,CHAININFO_TRIGGERING_RACE)&RACE_SPELLCASTER>0 - 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/c101304086.lua b/pre-release/c101304086.lua deleted file mode 100644 index e4834cbe90..0000000000 --- a/pre-release/c101304086.lua +++ /dev/null @@ -1,77 +0,0 @@ ---JP name ---Checkker ---Scripted by The Razgriz -local s,id=GetID() -local TOKEN_IRON_RUBBLE=id+100 -function s.initial_effect(c) - --Cannot be Normal Summoned if you control a monster - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_CANNOT_SUMMON) - e0:SetCondition(function(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>0 end) - c:RegisterEffect(e0) - --You can Tribute this card; Special Summon 1 Machine monster from your Deck whose ATK equals its own DEF, but return it to the hand during the End Phase - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfTribute) - e1:SetTarget(s.spfromdecktg) - e1:SetOperation(s.spfromdeckop) - c:RegisterEffect(e1) - --You can banish this card from your GY and discard 1 card; Special Summon 1 "Iron Rubble Token" (Machine/EARTH/Level 1/ATK 0/DEF 0), but it cannot be used as material for a Fusion, Synchro, or Link Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.AND(Cost.SelfBanish,Cost.Discard())) - e2:SetTarget(s.tokensptg) - e2:SetOperation(s.tokenspop) - c:RegisterEffect(e2) -end -s.listed_names={TOKEN_IRON_RUBBLE} -function s.spfromdeckfilter(c,e,tp) - return c:IsRace(RACE_MACHINE) and c:IsDefense(c:GetAttack()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spfromdecktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfromdeckfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spfromdeckop(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.spfromdeckfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - --Return it to the hand during the End Phase - aux.DelayedOperation(g,PHASE_END,id,e,tp,function(ag) Duel.SendtoHand(ag,nil,REASON_EFFECT) end,nil,0,0,aux.Stringid(id,2)) - end -end -function s.tokensptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_IRON_RUBBLE,0,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) -end -function s.tokenspop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_IRON_RUBBLE,0,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH) then - local token=Duel.CreateToken(tp,TOKEN_IRON_RUBBLE) - if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then - --It cannot be used as material for a Fusion, Synchro, or Link Summon - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_BE_MATERIAL) - e1:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_LINK)) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - token:RegisterEffect(e1) - end - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c101304087.lua b/pre-release/c101304087.lua deleted file mode 100644 index 55bebb5817..0000000000 --- a/pre-release/c101304087.lua +++ /dev/null @@ -1,81 +0,0 @@ ---JP name ---Rustin Mammoth ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card is in your hand: You can banish Machine Link Monsters from your Extra Deck whose combined Link Ratings equal exactly 5; Special Summon this card - 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.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --You can target 1 card you control and 1 card your opponent controls; return them to the hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND) - e2a:SetType(EFFECT_TYPE_IGNITION) - e2a:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2a:SetRange(LOCATION_MZONE) - e2a:SetCountLimit(1,{id,1}) - e2a:SetCondition(aux.NOT(s.rthquickcon)) - e2a:SetTarget(s.rthtg) - e2a:SetOperation(s.rthop) - c:RegisterEffect(e2a) - --This is a Quick Effect if this card is linked to a Link-3 or higher Machine Link Monster - local e2b=e2a:Clone() - e2b:SetType(EFFECT_TYPE_QUICK_O) - e2b:SetCode(EVENT_FREE_CHAIN) - e2b:SetCondition(s.rthquickcon) - e2b:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2b) -end -function s.spcostfilter(c) - return c:IsRace(RACE_MACHINE) and c:IsLinkMonster() and c:IsAbleToRemoveAsCost() -end -function s.rescon(sg,e,tp,mg) - return sg:GetSum(Card.GetLink)==5 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_EXTRA,0,nil) - if chk==0 then return #g>0 and aux.SelectUnselectGroup(g,e,tp,1,5,s.rescon,0) end - local rg=aux.SelectUnselectGroup(g,e,tp,1,5,s.rescon,1,tp,HINTMSG_REMOVE,s.rescon) - Duel.Remove(rg,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)>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.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetTargetGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if chk==0 then return #g>=2 and 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 -function s.rthquickconfilter(c,ec,lg) - return c:IsLinkAbove(3) and c:IsRace(RACE_MACHINE) and c:IsFaceup() and (c:GetLinkedGroup():IsContains(ec) or lg:IsContains(c)) -end -function s.rthquickcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(s.rthquickconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) -end \ No newline at end of file diff --git a/pre-release/c101304088.lua b/pre-release/c101304088.lua deleted file mode 100644 index 3926dd36bb..0000000000 --- a/pre-release/c101304088.lua +++ /dev/null @@ -1,90 +0,0 @@ ---JP name ---Officiating Reverie ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is in your hand: You can discard 1 other card; Special Summon this card - 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.Discard(nil,true)) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - c:RegisterEffect(e1) - --If an Xyz Monster(s) is sent to the GY, while this card is in your GY (except during the Damage Step): You can banish this card; Special Summon 1 Zombie monster from your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.gyspcon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.gysptg) - e2:SetOperation(s.gyspop) - c:RegisterEffect(e2) - --During the Standby Phase of the next turn after this card was banished: You can target 1 Zombie Xyz Monster you control; attach this banished card to it - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) - e3:SetRange(LOCATION_REMOVED) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e) return Duel.GetTurnCount()==e:GetHandler():GetTurnID()+1 end) - e3:SetTarget(s.attachtg) - e3:SetOperation(s.attachop) - c:RegisterEffect(e3) -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.gyspcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsXyzMonster,1,nil) -end -function s.gyspfilter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.gyspfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.gyspop(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.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.xyzfilter(c,tp,hc) - return c:IsRace(RACE_ZOMBIE) and c:IsXyzMonster() and c:IsFaceup() and hc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) -end -function s.attachtg(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.xyzfilter(chkc,tp,c) end - if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c) -end -function s.attachop(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 not tc:IsImmuneToEffect(e) then - Duel.Overlay(tc,c) - end -end \ No newline at end of file diff --git a/pre-release/c101304089.lua b/pre-release/c101304089.lua deleted file mode 100644 index e58fa97726..0000000000 --- a/pre-release/c101304089.lua +++ /dev/null @@ -1,78 +0,0 @@ ---JP name ---Officiator of Doom Samuel ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 6 monsters - Xyz.AddProcedure(c,nil,6,2) - --During the Main Phase (Quick Effect): You can detach 1 material from this card, then target 1 Zombie monster in your GY; Special Summon it, then you can negate the effects of 1 monster your opponent controls with ATK less than or equal to that monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(Cost.DetachFromSelf(1)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e1) - --If this card is sent to the GY: You can target 1 monster in either GY; shuffle it into the Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE) -end -function s.disfilter(c,atk) - return c:IsNegatableMonster() and c:IsAttackBelow(atk) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not (tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0) then return end - local atk=tc:GetAttack() - if Duel.IsExistingMatchingCard(s.disfilter,tp,0,LOCATION_MZONE,1,nil,atk) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local sc=Duel.SelectMatchingCard(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil,atk):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - Duel.BreakEffect() - --Negate the effects of 1 monster your opponent controls with ATK less than or equal to that monster - sc:NegateEffects(e:GetHandler()) - end -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsMonster() and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsMonster,Card.IsAbleToDeck),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,aux.AND(Card.IsMonster,Card.IsAbleToDeck),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101304090.lua b/pre-release/c101304090.lua deleted file mode 100644 index 14ea17cc74..0000000000 --- a/pre-release/c101304090.lua +++ /dev/null @@ -1,74 +0,0 @@ ---JP name ---GMX Partner Selandea ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can reveal this card in your hand; Special Summon 1 "GMX" monster or 1 Dinosaur monster from your hand, also you can only attack directly with "GMX" monsters for the rest of this 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_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.handsptg) - e1:SetOperation(s.handspop) - c:RegisterEffect(e1) - --If this card is Special Summoned by a monster effect: You can Special Summon 1 Level 4 or lower "GMX" or Dinosaur monster from your hand, GY, or banishment in Defense Position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_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.handgybansptg) - e2:SetOperation(s.handgybanspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_GMX} -function s.gmxdinospfilter(c,e,tp,pos) - return (c:IsSetCard(SET_GMX) or c:IsRace(RACE_DINOSAUR)) 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.gmxdinospfilter,tp,LOCATION_HAND,0,1,nil,e,tp,POS_FACEUP) 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 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.gmxdinospfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,POS_FACEUP) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - local c=e:GetHandler() - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) - --You can only attack directly with "GMX" monsters for the rest of this turn - 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_GMX) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.handgybanspfilter(c,e,tp) - return c:IsLevelBelow(4) and s.gmxdinospfilter(c,e,tp,POS_FACEUP_DEFENSE) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) -end -function s.handgybansptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.handgybanspfilter,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.handgybanspop(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.handgybanspfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end -end \ No newline at end of file diff --git a/pre-release/c101304091.lua b/pre-release/c101304091.lua deleted file mode 100644 index 9ebec69fa7..0000000000 --- a/pre-release/c101304091.lua +++ /dev/null @@ -1,89 +0,0 @@ ---JP name ---GMX Suppression Squad ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is in your hand and you control a "GMX" monster or a Dinosaur monster: You can Special Summon this card - 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) - --You can target 1 face-up monster on the field; excavate the top cards of your Deck until you excavate a Dinosaur monster, send that Dinosaur monster to the GY, and if you do, the targeted monster becomes a Dinosaur monster (until the end of this turn), also shuffle the rest into the Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.excavtg) - e2:SetOperation(s.excavop) - c:RegisterEffect(e2) -end -s.listed_series={SET_GMX} -function s.spconfilter(c) - return (c:IsSetCard(SET_GMX) or c:IsRace(RACE_DINOSAUR)) and c:IsFaceup() -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return 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.tgfilter(c) - return c:IsRace(RACE_DINOSAUR) and c:IsAbleToGrave() -end -function s.excavtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and not c:IsRace(RACE_DINOSAUR) and c:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(aux.NOT(Card.IsRace),RACE_DINOSAUR),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,aux.FaceupFilter(aux.NOT(Card.IsRace),RACE_DINOSAUR),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,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 g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil) - if #g==0 then - Duel.ConfirmDecktop(tp,deck_count) - local excav_g=Duel.GetDecktopGroup(tp,deck_count) - Duel.RaiseEvent(excav_g,EVENT_CUSTOM+101304092,e,REASON_EFFECT,tp,tp,deck_count) - 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) - local excav_g=Duel.GetDecktopGroup(tp,excav_count) - Duel.RaiseEvent(excav_g,EVENT_CUSTOM+101304092,e,REASON_EFFECT,tp,tp,excav_count) - local tc=Duel.GetFirstTarget() - if Duel.SendtoGrave(sc,REASON_EFFECT|REASON_EXCAVATE) and sc:IsLocation(LOCATION_GRAVE) and tc:IsRelateToEffect(e) - and tc:IsFaceup() and not tc:IsRace(RACE_DINOSAUR) then - --The targeted monster becomes a Dinosaur monster (until the end of this turn) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetValue(RACE_DINOSAUR) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end - end - end - Duel.ShuffleDeck(tp) -end \ No newline at end of file diff --git a/pre-release/c101304092.lua b/pre-release/c101304092.lua deleted file mode 100644 index a9619bbf83..0000000000 --- a/pre-release/c101304092.lua +++ /dev/null @@ -1,86 +0,0 @@ ---JP name ---Evolved Daneen ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: "Returned Dino Daneen" + 1 Dinosaur monster - Fusion.AddProcMix(c,false,false,29927283,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DINOSAUR)) - --If this card is Special Summoned: You can add 1 "GMX" card from your Deck to your hand. You can only use this effect of "Evolved Daneen" once per turn - 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:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If you excavate a card(s) by a "GMX" card effect: You can activate the following effect, based on where this card is at activation (but you can only use each effect of "Evolved Daneen" once per turn); - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_CUSTOM+101304092) - e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.effcon) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_names={29927283} --"Returned Dino Daneen" -s.listed_series={SET_GMX} -function s.thfilter(c) - return c:IsSetCard(SET_GMX) 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.effcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and r&REASON_EFFECT>0 and Chain.IsSetcode(0,SET_GMX) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - --● Field: Gain 1500 LP - local b1=not Duel.HasFlagEffect(tp,id) and c:IsLocation(LOCATION_MZONE) - --● GY: Special Summon this card - local b2=not Duel.HasFlagEffect(tp,id+100) and c:IsLocation(LOCATION_GRAVE) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - if chk==0 then return b1 or b2 end - local op=b1 and 1 or 2 - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_RECOVER) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1500) - elseif op==2 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Field: Gain 1500 LP - Duel.Recover(tp,1500,REASON_EFFECT) - elseif op==2 then - --● GY: Special Summon this card - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - end -end diff --git a/pre-release/c101304093.lua b/pre-release/c101304093.lua deleted file mode 100644 index df8f73a087..0000000000 --- a/pre-release/c101304093.lua +++ /dev/null @@ -1,116 +0,0 @@ ---JP name ---GMX - COMPREX ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "GMX" monster + 2+ Dinosaur monsters - Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DINOSAUR),2,99,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GMX)) - --Gains these effects based on the number of Dinosaur monsters used as Fusion Material for this card - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1a:SetCode(EVENT_SPSUMMON_SUCCESS) - e1a:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) - e1a:SetOperation(s.effop) - c:RegisterEffect(e1a) - --Track the number of Dinosaur monsters used as Fusion Material for this card - local e1b=Effect.CreateEffect(c) - e1b:SetType(EFFECT_TYPE_SINGLE) - e1b:SetCode(EFFECT_MATERIAL_CHECK) - e1b:SetValue(function(e,c) e1a:SetLabel(c:GetMaterial():FilterCount(Card.IsRace,nil,RACE_DINOSAUR,c,SUMMON_TYPE_FUSION,e:GetHandlerPlayer())) end) - c:RegisterEffect(e1b) - --Once per turn, if you excavate a card(s) by a "GMX" card effect: You can destroy all other monsters on the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_CUSTOM+101304092) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(s.descon) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_GMX} -s.material_setcode={SET_GMX} -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local dino_mats_count=e:GetLabel() - if dino_mats_count>=3 then - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) - --● 3+: Your opponent cannot target this card with card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetValue(aux.tgoval) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end - if dino_mats_count>=4 then - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) - --● 4+: Can make up to 3 attacks during each Battle Phase - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetValue(2) - e2:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e2) - end - if dino_mats_count>=5 then - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) - --● 5+: Each time your opponent Normal or Special Summons a monster(s), they lose 800 LP - local e3a=Effect.CreateEffect(c) - e3a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3a:SetCode(EVENT_SUMMON_SUCCESS) - e3a:SetRange(LOCATION_MZONE) - e3a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e3a:SetOperation(s.lpop) - e3a:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e3a) - local e3b=e3a:Clone() - e3b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3b) - end -end -function s.lpop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsChainSolving() then - Duel.Hint(HINT_CARD,0,id) - local opp=1-tp - Duel.SetLP(opp,Duel.GetLP(opp)-800) - else - local c=e:GetHandler() - --Your opponent loses 800 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) Duel.Hint(HINT_CARD,0,id) local opp=1-tp return Duel.SetLP(opp,Duel.GetLP(opp)-800) 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) - return ep==tp and r&REASON_EFFECT>0 and Chain.IsSetcode(0,SET_GMX) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - 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 c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,exc) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/pre-release/c101304094.lua b/pre-release/c101304094.lua deleted file mode 100644 index 700ba1ddf0..0000000000 --- a/pre-release/c101304094.lua +++ /dev/null @@ -1,77 +0,0 @@ ---JP name ---GMX 55th Experiment Report ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Fusion Summon 1 Dinosaur Fusion Monster from your Extra Deck using monsters from your hand or field. If your opponent controls a monster, you can also use 1 "GMX" monster in your Deck as material - local e1=Fusion.CreateSummonEff({ - handler=c, - fusfilter=function(c) return c:IsRace(RACE_DINOSAUR) end, - extrafil=s.fextra, - extratg=s.extratg - }) - e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --During your Main Phase: You can banish this card from your GY; excavate the top cards of your Deck until you excavate a "GMX" card, add that "GMX" card to your hand, also shuffle the rest into the Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.excavtg) - e2:SetOperation(s.excavop) - c:RegisterEffect(e2) -end -s.listed_series={SET_GMX} -function s.fcheck(tp,sg,fc) - return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 -end -function s.deckmatfilter(c) - return c:IsSetCard(SET_GMX) and c:IsMonster() and c:IsAbleToGrave() -end -function s.fextra(e,tp,mg) - if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 then - local eg=Duel.GetMatchingGroup(s.deckmatfilter,tp,LOCATION_DECK,0,nil) - if #eg>0 then - return eg,s.fcheck - end - end - return nil -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.thfilter(c) - return c:IsSetCard(SET_GMX) and c:IsAbleToHand() -end -function s.excavtg(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.excavop(e,tp,eg,ep,ev,re,r,rp) - local deck_count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if deck_count>0 then - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if #g==0 then - Duel.ConfirmDecktop(tp,deck_count) - local excav_g=Duel.GetDecktopGroup(tp,deck_count) - Duel.RaiseEvent(excav_g,EVENT_CUSTOM+101304092,e,REASON_EFFECT,tp,tp,deck_count) - 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) - local excav_g=Duel.GetDecktopGroup(tp,excav_count) - Duel.RaiseEvent(excav_g,EVENT_CUSTOM+101304092,e,REASON_EFFECT,tp,tp,excav_count) - if Duel.SendtoHand(sc,nil,REASON_EFFECT) then - Duel.ConfirmCards(1-tp,sc) - Duel.ShuffleHand(tp) - end - end - end - Duel.ShuffleDeck(tp) -end \ No newline at end of file diff --git a/pre-release/c101304095.lua b/pre-release/c101304095.lua deleted file mode 100644 index 4806568873..0000000000 --- a/pre-release/c101304095.lua +++ /dev/null @@ -1,73 +0,0 @@ ---JP name ---GMX Lab #5 ---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) - --Your opponent cannot activate cards or effects when you Normal or Special Summon a "GMX" monster(s) - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetRange(LOCATION_FZONE) - e1a:SetOperation(s.limop1) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - local e1c=e1a:Clone() - e1c:SetCode(EVENT_CHAIN_END) - e1c:SetOperation(s.limop2) - c:RegisterEffect(e1c) - --During your Main Phase: You can Set 1 "GMX" Spell/Trap from your Deck, except "GMX Lab #5", then place 1 card from your hand on top of the Deck. You can only use this effect of "GMX Lab #5" once per turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SET+CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_series={SET_GMX} -s.listed_names={id} -function s.limopfilter(c,tp) - return c:IsSetCard(SET_GMX) and c:IsFaceup() and c:IsSummonPlayer(tp) -end -function s.limop1(e,tp,eg,ep,ev,re,r,rp) - if eg and eg:IsExists(s.limopfilter,1,nil,tp) then - Duel.SetChainLimitTillChainEnd(function(re,rp,tp) return tp==rp end) - end -end -function s.limop2(e,tp,eg,ep,ev,re,r,rp) - local _,g=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true) - if g and g:IsExists(s.limopfilter,1,nil,tp) and Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) then - Duel.SetChainLimitTillChainEnd(function(re,rp,tp) return tp==rp end) - end -end -function s.setfilter(c) - return c:IsSetCard(SET_GMX) and c:IsSpellTrap() and c:IsSSetable() and not c:IsCode(id) -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) -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_DECK,0,1,1,nil) - if #g>0 and Duel.SSet(tp,g)>0 then - Duel.ShuffleDeck(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) - if #sg>0 then - Duel.BreakEffect() - Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101304096.lua b/pre-release/c101304096.lua deleted file mode 100644 index dc9d53d490..0000000000 --- a/pre-release/c101304096.lua +++ /dev/null @@ -1,52 +0,0 @@ ---JP name ---Anti-GMX Final Experiment ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate only if you control a "GMX" monster - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - e0:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GMX),tp,LOCATION_MZONE,0,1,nil) end) - c:RegisterEffect(e0) - --Once per turn, when your opponent activates a monster effect on the field (except during the Damage Step): You can excavate the top 5 cards of your Deck, then if you excavated a "GMX" card(s), negate that activated effect, also place all the excavated cards on the top or bottom of the Deck in any order - 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_SZONE) - e1:SetCountLimit(1) - e1:SetCondition(s.excavcon) - e1:SetTarget(s.excavtg) - e1:SetOperation(s.excavop) - c:RegisterEffect(e1) -end -s.listed_series={SET_GMX} -function s.excavcon(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.excavtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end - Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) -end -function s.excavop(e,tp,eg,ep,ev,re,r,rp) - local decktop5=Duel.GetDecktopGroup(tp,5) - if #decktop5==0 then return end - Duel.ConfirmDecktop(tp,5) - Duel.RaiseEvent(decktop5,EVENT_CUSTOM+101304092,e,REASON_EFFECT,tp,tp,#decktop5) - if decktop5:IsExists(Card.IsSetCard,1,nil,SET_GMX) then - Duel.BreakEffect() - Duel.NegateEffect(ev) - end - local op=0 - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>5 then - op=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) - end - if op==0 then - Duel.SortDecktop(tp,tp,#decktop5) - else - Duel.MoveToDeckBottom(decktop5,tp) - Duel.SortDeckbottom(tp,tp,#decktop5) - end -end \ No newline at end of file diff --git a/pre-release/c101305001.lua b/pre-release/c101305001.lua deleted file mode 100644 index bbfe73b131..0000000000 --- a/pre-release/c101305001.lua +++ /dev/null @@ -1,105 +0,0 @@ ---超魔剣士ブラック・カオス ---Black Chaos the Ultimate Magical Swordsman ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustBeSpecialSummoned() - --Must be Special Summoned (from your hand) by shuffling 1 Spellcaster or Warrior Ritual Monster from your hand or GY into the Deck - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_PROC) - e0:SetRange(LOCATION_HAND) - e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e0:SetCondition(s.spcon) - e0:SetTarget(s.sptg) - e0:SetOperation(s.spop) - c:RegisterEffect(e0) - --You can discard this card; place 1 Continuous Trap that mentions "Ritual of Light and Darkness" from your Deck or GY, face-up on your field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.pltg) - e1:SetOperation(s.plop) - c:RegisterEffect(e1) - --Unaffected by your opponent's activated effects while you have a Ritual Spell in your GY - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function(e) return Duel.IsExistingMatchingCard(Card.IsRitualSpell,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) end) - e2:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() end) - c:RegisterEffect(e2) - --Once per turn: You can banish 2 cards your opponent controls - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetTarget(s.rmtg) - e3:SetOperation(s.rmop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.spconfilter(c) - return c:IsRace(RACE_SPELLCASTER|RACE_WARRIOR) and c:IsRitualMonster() and c:IsAbleToDeckAsCost() -end -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,nil) - local sg=aux.SelectUnselectGroup(g,e,tp,1,1,nil,1,tp,HINTMSG_TODECK,nil,nil,true) - if #sg>0 then - e:SetLabelObject(sg) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if g then - local sc=g:GetFirst() - if sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - else - Duel.HintSelection(sc) - end - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) - end -end -function s.plfilter(c,tp) - return c:IsContinuousTrap() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,tp) end - Duel.SetPossibleOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - 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,tp):GetFirst() - if sc then - Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,1-tp,LOCATION_ONFIELD) -end -function s.rmop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,2,2,nil) - if #g==2 then - Duel.HintSelection(g) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305002.lua b/pre-release/c101305002.lua deleted file mode 100644 index 920f417ac2..0000000000 --- a/pre-release/c101305002.lua +++ /dev/null @@ -1,88 +0,0 @@ ---混沌の魔王-スカル・デーモン ---Skull Archfiend of Chaos ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is in your hand or GY: You can target 3 other cards in the GYs and/or face-up banishment, including a card that mentions "Ritual of Light and Darkness"; place them on the bottom of the Deck in any order, and if you do, Special Summon this card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.tdsptg) - e1:SetOperation(s.tdspop) - c:RegisterEffect(e1) - --If this card is sent to the GY: You can send 1 Ritual Spell from your hand or Deck to the GY; add 1 Ritual Monster mentioned on that card 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_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.thcost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.ListsCode,1,nil,CARD_RITUAL_OF_LIGHT_AND_DARKNESS) -end -function s.tdsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local c=e:GetHandler() - local g=Duel.GetTargetGroup(aux.FaceupFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,c) - if chk==0 then return #g>=3 and aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - local tg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TODECK) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,3,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.tdspop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and tg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK|LOCATION_EXTRA) then - local tg_your,tg_opp=tg:Split(Card.IsControler,nil,tp) - local your_count=tg_your:FilterCount(Card.IsLocation,nil,LOCATION_DECK) - local opp_count=tg_opp:FilterCount(Card.IsLocation,nil,LOCATION_DECK) - if your_count>=2 then - Duel.SortDeckbottom(tp,tp,your_count) - end - if opp_count>=2 then - Duel.SortDeckbottom(tp,1-tp,opp_count) - end - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function s.thcostfilter(c,tp) - return c:IsRitualSpell() and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c) -end -function s.thfilter(c,rit_spell) - return c:IsRitualMonster() and rit_spell:ListsCode(c:GetCode())and c:IsAbleToHand() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp):GetFirst() - Duel.SendtoGrave(sc,REASON_COST) - e:SetLabelObject(sc) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true 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,e:GetLabelObject()) - 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/c101305003.lua b/pre-release/c101305003.lua deleted file mode 100644 index 72f52e8d3e..0000000000 --- a/pre-release/c101305003.lua +++ /dev/null @@ -1,95 +0,0 @@ ---エルフの聖賢者 ---Mystical Celtic Sage ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --If this card is Normal or Special Summoned: You can activate this effect; you can only Special Summon from the Extra Deck once for the rest of this turn, also reveal your entire hand, and if there is a card that mentions "Ritual of Light and Darkness" in it, you can draw 3 cards, then discard 2 cards - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetTarget(s.drtg) - e1a:SetOperation(s.drop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --You can Tribute this card; Special Summon 1 Ritual Monster that mentions "Ritual of Light and Darkness" 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_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfTribute) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,1,nil) end - Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) - Duel.SetPossibleOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2) -end -function s.drop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) - --You can only Special Summon from the Extra Deck once for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(s.sprestrictioncon) - e1:SetOperation(s.sprestrictionop) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - if Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,1,nil) then return end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - if g:IsExists(Card.ListsCode,1,nil,CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and Duel.IsPlayerCanDraw(tp,3) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) and Duel.Draw(tp,3,REASON_EFFECT)==3 then - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT|REASON_DISCARD) - end -end -function s.sprestrictionconfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsSummonLocation(LOCATION_EXTRA) -end -function s.sprestrictioncon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.sprestrictionconfilter,1,nil,tp) -end -function s.sprestrictionop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - --You can only Special Summon from the Extra Deck once for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp) -end -function s.spfilter(c,e,tp) - return c:IsRitualMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>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,true,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101305004.lua b/pre-release/c101305004.lua deleted file mode 100644 index d3db506d7e..0000000000 --- a/pre-release/c101305004.lua +++ /dev/null @@ -1,78 +0,0 @@ ---グリフォー ---Gurifoh ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --(Quick Effect): You can discard this card, then activate 1 of these effects; - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfDiscard) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --For the Ritual Summon of exactly 1 Level 8 Ritual Monster with a card effect that requires use of monsters, this card can be used as the entire Tribute - Ritual.AddWholeLevelTribute(c,aux.FilterBoolFunction(Card.IsLevel,8)) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.setfilter(c) - return (c:IsQuickPlaySpell() or c:IsTrap()) and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsSSetable() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=true - local b2=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 - e:SetCategory(0) - elseif op==2 then - e:SetCategory(CATEGORY_SET) - Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) - 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 - --● The next battle or effect damage you take this turn will become 0 - 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_CHANGE_DAMAGE) - e1:SetTargetRange(1,0) - e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - elseif op==2 then - --● Set 1 Quick-Play Spell or Trap that mentions "Ritual of Light and Darkness" from your Deck. It can be activated this turn - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SSet(tp,sc)>0 then - local eff_code=sc:IsQuickPlaySpell() and EFFECT_QP_ACT_IN_SET_TURN or EFFECT_TRAP_ACT_IN_SET_TURN - --It can be activated this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,4)) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(eff_code) - e2:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e2) - end - end -end -function s.damval(e,re,val,r,rp,rc) - if r&(REASON_BATTLE|REASON_EFFECT)>0 then - Duel.Hint(HINT_CARD,0,id) - e:Reset() - return 0 - end - return val -end \ No newline at end of file diff --git a/pre-release/c101305005.lua b/pre-release/c101305005.lua deleted file mode 100644 index 0ce96e4a78..0000000000 --- a/pre-release/c101305005.lua +++ /dev/null @@ -1,82 +0,0 @@ ---劫火の三幻魔-神炎皇ウリア ---Uria, Lord of Searing Flames - Sacred Beast of Cataclysmic Fire ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Must be Special Summoned with a "Sacred Beast" card - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_CONDITION) - e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end) - c:RegisterEffect(e0) - --You can reveal this card in your hand; add 1 "Sacred Beast" Trap 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) - --Gains 1000 ATK/DEF for each Trap in the GYs - local e2a=Effect.CreateEffect(c) - e2a:SetType(EFFECT_TYPE_SINGLE) - e2a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2a:SetCode(EFFECT_UPDATE_ATTACK) - e2a:SetRange(LOCATION_MZONE) - e2a:SetValue(function(e,c) return 1000*Duel.GetMatchingGroupCount(Card.IsTrap,0,LOCATION_GRAVE,LOCATION_GRAVE,nil) end) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e2b) - --Once per turn (Quick Effect): You can target 1 Spell/Trap on the field; destroy it. Neither player can activate cards or effects in response to this effect's activation - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - 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_series={SET_SACRED_BEAST} -function s.thfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsTrap() 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 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.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 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetChainLimit(aux.FALSE) -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/c101305006.lua b/pre-release/c101305006.lua deleted file mode 100644 index 69c9fb59e4..0000000000 --- a/pre-release/c101305006.lua +++ /dev/null @@ -1,104 +0,0 @@ ---罪禍の三幻魔-降雷皇ハモン ---Hamon, Lord of Striking Thunder - Sacred Beast of Sinful Catastrophe ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Must be Special Summoned with a "Sacred Beast" card - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_CONDITION) - e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end) - c:RegisterEffect(e0) - --You can reveal this card in your hand; add 1 "Sacred Beast" Spell 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) - --Once per turn, if a monster(s) is sent to your opponent's GY: Inflict 1000 damage to your opponent - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(s.damcon) - e2:SetTarget(s.damtg) - e2:SetOperation(s.damop) - c:RegisterEffect(e2) - --If this card is destroyed by battle or card effect: You can activate this effect; you take no damage this turn - 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_DESTROYED) - e3:SetCondition(s.nodamcon) - e3:SetTarget(s.nodamtg) - e3:SetOperation(s.nodamop) - c:RegisterEffect(e3) -end -s.listed_series={SET_SACRED_BEAST} -function s.thfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsSpell() 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 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.damconfilter(c,opp) - return c:IsMonster() and c:IsControler(opp) -end -function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.damconfilter,1,nil,1-tp) -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,1,tp,1-tp,1000) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.Damage(1-tp,d,REASON_EFFECT) -end -function s.nodamcon(e,tp,eg,ep,ev,re,r,rp) - return (r&(REASON_EFFECT|REASON_BATTLE))>0 -end -function s.nodamtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end -end -function s.nodamop(e,tp,eg,ep,ev,re,r,rp) - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - --You take no damage this turn - 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_CHANGE_DAMAGE) - e1:SetTargetRange(1,0) - e1:SetValue(0) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - Duel.RegisterEffect(e2,tp) -end \ No newline at end of file diff --git a/pre-release/c101305007.lua b/pre-release/c101305007.lua deleted file mode 100644 index 0413793407..0000000000 --- a/pre-release/c101305007.lua +++ /dev/null @@ -1,93 +0,0 @@ ---無窮の三幻魔-幻魔皇ラビエル ---Raviel, Lord of Phantasms - Sacred Beast of Endless Eternity ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Must be Special Summoned with a "Sacred Beast" card - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_CONDITION) - e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end) - c:RegisterEffect(e0) - --You can reveal this card in your hand; add 1 "Sacred Beast" monster from your Deck to your hand, except "Raviel, Lord of Phantasms - Sacred Beast of Endless Eternity", 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) - --Once per turn (Quick Effect): You can Tribute 2 other "Sacred Beast" monsters; destroy as many monsters your opponent controls as possible, and if you do, this card gains 1000 ATK for each card destroyed by this effect - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCost(s.descost) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_SACRED_BEAST} -function s.thfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsMonster() 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_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 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.descostfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) -end -function s.descostchk(sg,tp,exg) - return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,sg) -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.descostfilter,2,false,s.descostchk,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectReleaseGroupCost(tp,s.descostfilter,2,2,false,s.descostchk,c) - Duel.Release(g,REASON_COST) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),0,tp,#g*1000) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - if #g==0 then return end - local ct=Duel.Destroy(g,REASON_EFFECT) - if ct==0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - --This card gains 1000 ATK for each card destroyed by this effect - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(ct*1000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101305008.lua b/pre-release/c101305008.lua deleted file mode 100644 index 9de3edcbcb..0000000000 --- a/pre-release/c101305008.lua +++ /dev/null @@ -1,75 +0,0 @@ ---三幻魔の操世者 ---The Orchestrator of the Sacred Beasts ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --You can reveal this card in your hand; discard 1 card, and if you do, Special Summon 1 "Sacred Beast" monster from your hand in Defense Position, except a Level 8 monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.sptg(LOCATION_HAND)) - e1:SetOperation(s.spop(LOCATION_HAND)) - c:RegisterEffect(e1) - --You can discard 1 card; Special Summon 1 "Sacred Beast" monster from your hand or GY in Defense Position, except a Level 8 monster or the discarded card - local e2=e1:Clone() - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.Discard(nil,false,1,1,function(e,tp,og) local oc=og:GetFirst() oc:CreateEffectRelation(e) e:SetLabelObject(oc) end)) - e2:SetTarget(s.sptg(LOCATION_HAND|LOCATION_GRAVE)) - e2:SetOperation(s.spop(LOCATION_HAND|LOCATION_GRAVE)) - c:RegisterEffect(e2) - --You can banish this card from your GY; Special Summon 1 "Sacred Beast" monster from your GY in Defense Postion, except a Level 8 monster - local e3=e2:Clone() - e3:SetDescription(aux.Stringid(id,2)) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.sptg(LOCATION_GRAVE)) - e3:SetOperation(s.spop(LOCATION_GRAVE)) - c:RegisterEffect(e3) -end -s.listed_series={SET_SACRED_BEAST} -function s.discardfilter(c,e,tp) - return c:IsDiscardable(REASON_EFFECT) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,c,e,tp) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_SACRED_BEAST) and not c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP_DEFENSE) -end -function s.sptg(summon_location) - return function(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - if summon_location==LOCATION_HAND then - return Duel.IsExistingMatchingCard(s.discardfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - else - return Duel.IsExistingMatchingCard(s.spfilter,tp,summon_location,0,1,e:GetHandler(),e,tp) - end - end - if summon_location==LOCATION_HAND then - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,summon_location) - end -end -function s.spop(summon_location) - return function(e,tp,eg,ep,ev,re,r,rp) - if summon_location==LOCATION_HAND and Duel.DiscardHand(tp,s.discardfilter,1,1,REASON_EFFECT|REASON_DISCARD,nil,e,tp)<0 then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local exc=nil - if summon_location==LOCATION_HAND|LOCATION_GRAVE then - local cost_card=e:GetLabelObject() - exc=cost_card:IsRelateToEffect(e) and cost_card or nil - end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,summon_location,0,1,1,exc,e,tp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,true,POS_FACEUP_DEFENSE)>0 then - sc:CompleteProcedure() - end - end -end \ No newline at end of file diff --git a/pre-release/c101305009.lua b/pre-release/c101305009.lua deleted file mode 100644 index bea0672623..0000000000 --- a/pre-release/c101305009.lua +++ /dev/null @@ -1,108 +0,0 @@ ---三幻魔の殉教者 ---Martyr of the Sacred Beasts ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card is Normal or Special Summoned: You can place 1 "Sacred Beast" Field Spell or "Sacred Beast" Continuous Spell/Trap from your Deck face-up on your field - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - 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.pltg) - e1a:SetOperation(s.plop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --If you control another "Sacred Beast" monster: You can Special Summon 2 "Martyr of the Sacred Beasts" from your hand, Deck, and/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_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --During your opponent's End Phase, if this card and a Level 10 "Sacred Beast" monster are in your GY: 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_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_GRAVE) - 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} -s.listed_series={SET_SACRED_BEAST} -function s.plfilter(c,tp,szone_chk) - return c:IsSetCard(SET_SACRED_BEAST) and not c:IsForbidden() and c:CheckUniqueOnField(tp) - and (c:IsFieldSpell() or (szone_chk and c:IsContinuousSpellTrap())) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local szone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp,szone_chk) - end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - local szone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp,szone_chk):GetFirst() - if sc then - if sc:IsFieldSpell() then - local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) - if fc then - Duel.SendtoGrave(fc,REASON_RULE) - Duel.BreakEffect() - end - Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) - else - Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - end -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SACRED_BEAST),tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function s.spfilter(c,e,tp) - return 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)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,2,nil,e,tp) - if #g==2 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thconfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsLevel(10) -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(s.thconfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) -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/c101305010.lua b/pre-release/c101305010.lua deleted file mode 100644 index d01a2dca14..0000000000 --- a/pre-release/c101305010.lua +++ /dev/null @@ -1,120 +0,0 @@ ---ウィスカ・ブリッツクリーク ---Wisca Blitzclique ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If a card(s) was destroyed by your "Blitzclique" card's effect this turn (Quick Effect): You can reveal this card in your hand; Special Summon up to 3 Thunder monsters from your hand, then you can destroy up to that many cards on the field, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --Track destroyed cards - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_DESTROYED) - ge1:SetOperation(s.descheckop) - Duel.RegisterEffect(ge1,0) - end) - --When a monster effect is activated, except in the hand (Quick Effect): You can return 1 other Thunder monster you control to the hand; negate the activation, and if you do, destroy the activating monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.negcon) - e2:SetCost(s.negcost) - e2:SetTarget(s.negtg) - e2:SetOperation(s.negop) - c:RegisterEffect(e2) -end -s.listed_series={SET_BLITZCLIQUE} -function s.descheckop(e,tp,eg,ep,ev,re,r,rp) - if not re then return end - local rc=re:GetHandler() - if rc and rc:IsSetCard(SET_BLITZCLIQUE) then - Duel.RegisterFlagEffect(rp,id,RESET_PHASE|PHASE_END,0,1) - end -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_THUNDER) 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) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -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 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,math.min(ft,3),nil,e,tp) - if #g>0 then - local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - if ct>0 then - local fg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - if #fg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=fg:Select(tp,1,ct,nil) - if #dg>0 then - Duel.HintSelection(dg) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end - end - end - end - --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - 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:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) - and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)~=LOCATION_HAND -end -function s.negcostfilter(c) - return c:IsRace(RACE_THUNDER) and c:IsFaceup() and c:IsAbleToHandAsCost() -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.negcostfilter,tp,LOCATION_MZONE,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,s.negcostfilter,tp,LOCATION_MZONE,0,1,1,c) - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,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/c101305011.lua b/pre-release/c101305011.lua deleted file mode 100644 index e6c1787a5d..0000000000 --- a/pre-release/c101305011.lua +++ /dev/null @@ -1,83 +0,0 @@ ---サージ・ブリッツクリーク ---Surge Blitzclique ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --You can reveal this card in your hand, then target 1 monster on the field; destroy it, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can add 1 "Blitzclique" monster from your Deck to your hand, except "Surge Blitzclique" - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_BLITZCLIQUE} -function s.desfilter(c,tp) - return Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -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.GetLocationCount(tp,LOCATION_MZONE)>0 then - 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 - --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - 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 (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thfilter(c) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsMonster() 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) -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/c101305012.lua b/pre-release/c101305012.lua deleted file mode 100644 index ad598c3a0a..0000000000 --- a/pre-release/c101305012.lua +++ /dev/null @@ -1,80 +0,0 @@ ---クラック・ブリッツクリーク ---Crack Blitzclique ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --When your opponent activates a monster effect on the field during their turn (Quick Effect): You can reveal this card in your hand; destroy that monster, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.descon) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can send 1 "Blitzclique" Spell/Trap from your Deck to the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - c:RegisterEffect(e2) -end -s.listed_series={SET_BLITZCLIQUE} -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and rp==1-tp and re:IsMonsterEffect() and re:GetHandler():IsRelateToEffect(re) - and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.destg(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_DESTROY,re:GetHandler(),1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if rc:IsRelateToEffect(re) and Duel.Destroy(rc,REASON_EFFECT)>0 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,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - 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 (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.tgfilter(c) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsSpellTrap() 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) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305013.lua b/pre-release/c101305013.lua deleted file mode 100644 index 60965c86a4..0000000000 --- a/pre-release/c101305013.lua +++ /dev/null @@ -1,83 +0,0 @@ ---グレイン・ブリッツクリーク ---Grain Blitzclique ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --You can reveal this card in your hand, then target 1 Spell/Trap on the field; destroy it, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can add 1 "Blitzclique" Spell or "Kowloon, Citadel of the Sky" from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={101305050} --Kowloon, Citadel of the Sky -s.listed_series={SET_BLITZCLIQUE} -function s.desfilter(c,tp) - return c:IsSpellTrap() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -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.GetLocationCount(tp,LOCATION_MZONE)>0 then - 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 - --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - 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 (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thfilter(c) - return ((c:IsSetCard(SET_BLITZCLIQUE) and c:IsSpell()) or c:IsCode(101305050)) 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/c101305014.lua b/pre-release/c101305014.lua deleted file mode 100644 index ae1e3f1487..0000000000 --- a/pre-release/c101305014.lua +++ /dev/null @@ -1,83 +0,0 @@ ---エミ・ブリッツクリーク ---Emi Blitzclique ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If this card is added to your hand, except by drawing it: You can reveal it, then target 1 card on the field; destroy it, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_TO_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e) return not e:GetHandler():IsReason(REASON_DRAW) end) - e1:SetCost(Cost.SelfReveal) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can add 1 "Blitzclique" Trap from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_BLITZCLIQUE} -function s.desfilter(c,tp) - return Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -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.GetLocationCount(tp,LOCATION_MZONE)>0 then - 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 - --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand - 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 (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thfilter(c) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsTrap() 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/c101305015.lua b/pre-release/c101305015.lua deleted file mode 100644 index d2f5451a5e..0000000000 --- a/pre-release/c101305015.lua +++ /dev/null @@ -1,91 +0,0 @@ ---追憶のアレイスター ---Aleister the Reminiscent ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card is in your hand: You can target 1 Spellcaster monster or 1 Fusion Monster on the field; Special Summon this card, and if you do, the targeted monster gains 1000 ATK until the end of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) - 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) - --If this card is Normal or Special Summoned, or flipped face-up: You can banish 1 "Invoked" monster from your Extra Deck; add 1 "Invocation", or 1 Spell that mentions it, 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:SetCost(s.thcost) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - local e2c=e2a:Clone() - e2c:SetCode(EVENT_FLIP) - c:RegisterEffect(e2c) -end -s.listed_names={CARD_INVOCATION} -s.listed_series={SET_INVOKED} -function s.atkfilter(c) - return (c:IsRace(RACE_SPELLCASTER) or c:IsFusionMonster()) and c:IsFaceup() -end -function s.sptg(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) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - local tc=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,1000) -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) and tc:IsFaceup() then - --The targeted monster gains 1000 ATK until the end of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end - end -end -function s.thcostfilter(c) - return c:IsSetCard(SET_INVOKED) and c:IsMonster() and c:IsAbleToRemoveAsCost() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_EXTRA,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.thfilter(c) - return (c:IsCode(CARD_INVOCATION) or (c:IsSpell() and c:ListsCode(CARD_INVOCATION))) 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 tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if tc then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end \ No newline at end of file diff --git a/pre-release/c101305016.lua b/pre-release/c101305016.lua deleted file mode 100644 index c5aa5ddb4c..0000000000 --- a/pre-release/c101305016.lua +++ /dev/null @@ -1,87 +0,0 @@ ---法の神霊アイワス ---Aiwass the Spirit of the Law ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --You can banish this card from your hand or field; add 1 "Aleister" monster from your Deck to your hand, then if this effect was activated on the field, immediately after this effect resolves, you can Normal Summon 1 Spellcaster monster - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND|LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.SelfBanish) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If a face-up Fusion Monster(s) you control is sent to the GY, except by battle, while this card is in your GY: You can Special Summon this card, then you can Fusion Summon 1 "Invoked" monster, using monsters from your hand or field - 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,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_TO_GRAVE) - 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_ALEISTER,SET_INVOKED} -function s.thfilter(c) - return c:IsSetCard(SET_ALEISTER) and c:IsMonster() 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) - local trigger_loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION) - if (trigger_loc&LOCATION_MZONE)>0 then - Duel.SetPossibleOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) - end -end -function s.nsfilter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsSummonable(true,nil) -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) - local trigger_loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION) - if (trigger_loc&LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - 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.BreakEffect() - Duel.Summon(tp,sc,true,nil) - end - end - end -end -function s.spconfilter(c,tp) - return c:IsPreviousPosition(POS_FACEUP) and c:IsFusionMonster() and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsPreviousControler(tp) and not c:IsReason(REASON_BATTLE) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and 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) - Duel.SetPossibleOperationInfo(0,CATEGORY_FUSION_SUMMON,nil,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 fusion_params={handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_INVOKED)} - if Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.BreakEffect() - Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp,1) - end - end -end \ No newline at end of file diff --git a/pre-release/c101305017.lua b/pre-release/c101305017.lua deleted file mode 100644 index 7169365078..0000000000 --- a/pre-release/c101305017.lua +++ /dev/null @@ -1,102 +0,0 @@ ---人工神霊ヴィラカム ---Virakam the Artificial Spirit ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If you have an "Aleister" monster in your field or GY: 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 Special Summoned: You can Set 1 "Invocation", or 1 Spell that mentions it, from your Deck - 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_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) - --When your opponent activates a card or effect in response to the activation of your Fusion Monster's effect (Quick Effect): You can banish this card from the field, and if you do, negate that opponent's effect, and if you do that, banish that card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_REMOVE+CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_CHAINING) - 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_names={CARD_INVOCATION} -s.listed_series={SET_ALEISTER} -function s.spconfilter(c) - return c:IsSetCard(SET_ALEISTER) and c:IsMonster() and c:IsFaceup() -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,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.setfilter(c) - return (c:IsCode(CARD_INVOCATION) or (c:IsSpell() and c:ListsCode(CARD_INVOCATION))) 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_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) -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_DECK,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - local chainlink=Duel.GetCurrentChain(true)-1 - if not (chainlink>0 and Duel.IsChainDisablable(ev) and ep==1-tp) then return false end - local trig_player,trig_type=Duel.GetChainInfo(chainlink,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_TYPE) - return trig_player==tp and (trig_type&TYPE_FUSION)>0 -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local rc=re:GetHandler() - local relation=rc:IsRelateToEffect(re) - if chk==0 then return c:IsAbleToRemove() and (rc:IsAbleToRemove(tp) - or (not relation and Duel.IsPlayerCanRemove(tp))) end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) - if relation then - rc:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,Group.FromCards(c,rc),1,tp,0) - else - Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,rc:GetPreviousControler(),rc:GetPreviousLocation()) - end -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_REMOVED) - and Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305018.lua b/pre-release/c101305018.lua deleted file mode 100644 index 45c791b1ba..0000000000 --- a/pre-release/c101305018.lua +++ /dev/null @@ -1,93 +0,0 @@ ---幻影騎士団ディケイクローク ---The Phantom Knights of Decayed Cloak ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --You can reveal 1 other "The Phantom Knights" card in your hand; 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:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and not c:IsPublic() end,true)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If this card is Normal or Special Summoned: You can add 1 "The Phantom Knights" monster 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) - --You can banish this card from your GY, then target 1 Xyz Monster you control; this turn, you can use it as material for an Xyz Summon using its Rank as if it were a Level - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.xyztg) - e3:SetOperation(s.xyzop) - c:RegisterEffect(e3) -end -s.listed_series={SET_THE_PHANTOM_KNIGHTS} -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_THE_PHANTOM_KNIGHTS) 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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - end -end -function s.xyzfilter(c) - return c:IsXyzMonster() and c:IsFaceup() and not c:HasFlagEffect(id) -end -function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.xyzfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.xyzop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) - --This turn, you can use it as material for an Xyz Summon using its Rank as if it were a Level - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_XYZ_LEVEL) - e1:SetValue(function(e,c,rc) return c:GetRank() end) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101305019.lua b/pre-release/c101305019.lua deleted file mode 100644 index 920dc62e37..0000000000 --- a/pre-release/c101305019.lua +++ /dev/null @@ -1,89 +0,0 @@ ---幻影騎士団ドゥームソルレット ---The Phantom Knights of Doomed Solleret ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --If you control no monsters, you can Special Summon this card (from your hand). You can only Special Summon "The Phantom Knights of Doomed Solleret" once per turn this way - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) - --If this card is Normal or Special Summoned: You can Set 1 "The Phantom Knights" Spell/Trap from your Deck - 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_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.settg) - e2a:SetOperation(s.setop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --You can banish this card from your GY, then target up to 2 Level/Rank 3 DARK monsters you control; increase their Levels/Ranks by 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_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.lvtg) - e3:SetOperation(s.lvop) - c:RegisterEffect(e3) -end -s.listed_series={SET_THE_PHANTOM_KNIGHTS} -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end -function s.setfilter(c) - return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) 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_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) -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_DECK,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end -end -function s.lvfilter(c) - return (c:IsLevel(3) or c:IsRank(3)) and c:IsAttribute(ATTRIBUTE_DARK) 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 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,2,nil) -end -function s.lvop(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() - for tc in tg:Iter() do - --Increase their Levels/Ranks by 1 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - if tc:HasLevel() then - e1:SetCode(EFFECT_UPDATE_LEVEL) - else - e1:SetCode(EFFECT_UPDATE_RANK) - end - 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/c101305020.lua b/pre-release/c101305020.lua deleted file mode 100644 index dccb928814..0000000000 --- a/pre-release/c101305020.lua +++ /dev/null @@ -1,83 +0,0 @@ ---S-Force シグナス ---S-Force Signus ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If this card is Normal or Special Summoned: You can add 1 "S-Force" monster from your Deck to your hand, except "S-Force Signus", then if an opponent's monster is in this card's column, you can draw 1 card - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DRAW) - 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) - --If an opponent's monster activates its effect in the same column as your monster: You can make all "S-Force" monsters you currently control gain 1000 ATK - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.atkcon) - e2:SetTarget(s.atktg) - e2:SetOperation(s.atkop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_S_FORCE} -function s.thfilter(c) - return c:IsSetCard(SET_S_FORCE) and c:IsMonster() 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.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,1,tp,0) -end -function s.columnfilter(c,opp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(opp) -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 or Duel.SendtoHand(g,nil,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_HAND) then return end - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.ShuffleDeck(tp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanDraw(tp,1) - and c:GetColumnGroup():IsExists(s.columnfilter,1,nil,1-tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local trig_ctrl,trig_loc,trig_seq=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) - return trig_ctrl==1-tp and trig_loc==LOCATION_MZONE - and Duel.IsExistingMatchingCard(Card.IsColumn,tp,LOCATION_MZONE,0,1,nil,trig_seq,1-tp,LOCATION_MZONE) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_S_FORCE),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.IsSetCard,SET_S_FORCE),tp,LOCATION_MZONE,0,nil) - for tc in g:Iter() do - --All "S-Force" monsters you currently control gain 1000 ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(1000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101305021.lua b/pre-release/c101305021.lua deleted file mode 100644 index 86b41a3439..0000000000 --- a/pre-release/c101305021.lua +++ /dev/null @@ -1,90 +0,0 @@ ---メルフィー・ラビィーズ ---Melffy Rabbys ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If your opponent Normal or Special Summons a monster(s): You can Special Summon this card from your hand, then you can Fusion Summon 1 "Melffy" Fusion Monster from your Extra Deck, using monsters from your hand or field - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetRange(LOCATION_HAND) - e1a:SetCountLimit(1,id) - e1a:SetCondition(s.spcon) - e1a:SetTarget(s.sptg) - e1a:SetOperation(s.spop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --If this card is Normal or Special Summoned: You can add 1 "Melffy" monster from your Deck to your hand, then if you added a Normal Monster, you can Special Summon any number of Beast monsters from your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+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) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) -end -s.listed_series={SET_MELFFY} -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsSummonPlayer,1,nil,1-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_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_FUSION_SUMMON,nil,1,tp,LOCATION_EXTRA) -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 fusion_params={handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_MELFFY)} - if Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp,1) - end - end -end -function s.thfilter(c) - return c:IsSetCard(SET_MELFFY) 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) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -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) - if not sc:IsType(TYPE_NORMAL) then return end - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end - ft=math.min(#g,ft) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,ft,nil) - 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/c101305022.lua b/pre-release/c101305022.lua deleted file mode 100644 index 5ec090c948..0000000000 --- a/pre-release/c101305022.lua +++ /dev/null @@ -1,99 +0,0 @@ ---始まりの神ファーラ ---Phara, the Goddess of the Beginning ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can reveal this card and 1 Spell/Trap in your hand; neither player can activate cards or effects in response to the card or effect activation of a card with the same name as the revealed Spell/Trap until the end of the next turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.effcost) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --If this card is sent from the hand or field to the GY by Spell/Trap effect: You can Special Summon this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --If this card is Special Summoned from the GY: You can take control of the 1 monster your opponent controls with the highest ATK (your choice, if tied) - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_CONTROL) - 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.ctrltg) - e3:SetOperation(s.ctrlop) - c:RegisterEffect(e3) -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsPublic() and Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,aux.NOT(Card.IsPublic)),tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,aux.AND(Card.IsSpellTrap,aux.NOT(Card.IsPublic)),tp,LOCATION_HAND,0,1,1,c):GetFirst() - Duel.ConfirmCards(1-tp,Group.FromCards(c,rc)) - Duel.ShuffleHand(tp) - e:SetLabel(rc:GetOriginalCodeRule()) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,1,aux.Stringid(id,3),nil,2) - local revealed_card_code=e:GetLabel() - --Neither player can activate cards or effects in response to the card or effect activation of a card with the same name as the revealed Spell/Trap until the end of the next turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAINING) - e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - local trig_code1,trig_code2=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2) - if trig_code1==revealed_card_code or trig_code2==revealed_card_code then - return Duel.SetChainLimit(aux.FALSE) - end - end) - e1:SetReset(RESET_PHASE|PHASE_END,2) - Duel.RegisterEffect(e1,tp) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) and re and re:IsSpellTrapEffect() -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.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack) - if chk==0 then return g and g:IsExists(Card.IsControlerCanBeChanged,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) -end -function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack) - if not g or #g==0 then return end - g:Match(Card.IsControlerCanBeChanged,nil) - if #g>=2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - g=g:Select(tp,1,1,nil) - end - if #g>0 then - Duel.HintSelection(g) - Duel.GetControl(g,tp) - end -end diff --git a/pre-release/c101305023.lua b/pre-release/c101305023.lua deleted file mode 100644 index 9e4a313117..0000000000 --- a/pre-release/c101305023.lua +++ /dev/null @@ -1,109 +0,0 @@ ---繋星の雷后 ---Astrolasma Urania ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --You can Special Summon this card (from your hand) by returning up to 2 monsters you control to the hand. You can only Special Summon "Astrolasma Urania" once per turn this way - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If this card is Special Summoned: You can reveal any number of monsters with different Levels in your hand, then target that many face-up cards your opponent controls; negate their effects - 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:SetCost(s.discost) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --If this card on the field is destroyed by card effect and sent to the GY: 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_DESTROYED) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.thcon) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local g=Duel.GetMatchingGroup(Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,nil) - return #g>0 and Duel.GetMZoneCount(tp,g)>0 -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,nil) - local sg=aux.SelectUnselectGroup(g,e,tp,1,2,aux.ChkfMMZ(1),1,tp,HINTMSG_RTOHAND,nil,nil,true) - if #sg>0 then - e:SetLabelObject(sg) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if g then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_COST) - end -end -function s.discostfilter(c) - return c:IsMonster() and c:HasLevel() and not c:IsPublic() -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.discostfilter,tp,LOCATION_HAND,0,nil) - local max_target_count=Duel.GetTargetCount(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) - if chk==0 then return #g>0 and max_target_count>0 end - local max_reveal_count=math.min(max_target_count,g:GetClassCount(Card.GetLevel)) - local sg=aux.SelectUnselectGroup(g,e,tp,1,max_reveal_count,aux.dpcheck(Card.GetLevel),1,tp,HINTMSG_CONFIRM) - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - e:SetLabel(#sg) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end - if chk==0 then return true end - local target_count=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,target_count,target_count,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,target_count,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==0 then return end - local c=e:GetHandler() - for tc in tg:Iter() do - --Negate their effects - tc:NegateEffects(c,nil,true) - end -end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) and c:IsLocation(LOCATION_GRAVE) -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/c101305024.lua b/pre-release/c101305024.lua deleted file mode 100644 index ef7db47f2b..0000000000 --- a/pre-release/c101305024.lua +++ /dev/null @@ -1,55 +0,0 @@ ---沼地の魔道王 ---Magical King of the Swamp ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is in your hand: You can reveal 1 Fusion Monster in your Extra Deck and banish 1 material whose name is mentioned on it from your Deck, then Special Summon this card, and its name can be treated as the banished monster's if used as Fusion Material this turn. You can only use this effect of "Magical King of the Swamp" once per turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+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 -function s.revealfilter(c,tp) - return c:IsFusionMonster() and c.material and Duel.IsExistingMatchingCard(s.banfilter,tp,LOCATION_DECK,0,1,nil,c.material) -end -function s.banfilter(c,codes) - return c:IsCode(codes) and c:IsAbleToRemove() -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) - and Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local reveal_card=Duel.SelectMatchingCard(tp,s.revealfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp):GetFirst() - if not reveal_card then return end - Duel.ConfirmCards(1-tp,reveal_card) - Duel.ShuffleExtra(tp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local banish_card=Duel.SelectMatchingCard(tp,s.banfilter,tp,LOCATION_DECK,0,1,1,nil,reveal_card.material):GetFirst() - if banish_card and Duel.Remove(banish_card,POS_FACEUP,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then - Duel.BreakEffect() - if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --Its name can be treated as the banished monster's if used as Fusion Material this turn - 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_ADD_CODE) - e1:SetValue(banish_card:GetOriginalCodeRule()) - e1:SetOperation(function(scard,sumtype,tp) return (sumtype&MATERIAL_FUSION)>0 or (sumtype&SUMMON_TYPE_FUSION)>0 end) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - end - end -end \ No newline at end of file diff --git a/pre-release/c101305025.lua b/pre-release/c101305025.lua deleted file mode 100644 index ba296927fd..0000000000 --- a/pre-release/c101305025.lua +++ /dev/null @@ -1,118 +0,0 @@ ---薄明の魔 レイラージュ ---Rayrage, the Twilight Fiend ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --If a Pendulum Monster(s) you control would be destroyed by an opponent's card effect, you can destroy this card instead of 1 of those Pendulum Monsters. You can only use this effect of "Rayrage, the Twilight Fiend" once per turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetRange(LOCATION_PZONE) - e1:SetTarget(s.reptg) - e1:SetOperation(s.repop) - e1:SetValue(function(e,c) return c==e:GetLabelObject():GetFirst() end) - c:RegisterEffect(e1) - --If this card is in your hand: You can target 1 Pendulum Monster you control; place that Pendulum Monster in your Pendulum Zone (but it cannot activate its Pendulum Effects this turn), and if you do, Special Summon this card - 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_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --(Quick Effect): You can Tribute this card, then target 1 card in your Pendulum Zone; it cannot be destroyed by your opponent's card effects this turn - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - 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,1}) - e3:SetCost(Cost.SelfTribute) - e3:SetTarget(s.efftg) - e3:SetOperation(s.effop) - c:RegisterEffect(e3) -end -function s.repfilter(c,tp,opp) - return c:IsPendulumMonster() and c:IsControler(tp) and c:IsOnField() and c:IsReasonPlayer(opp) - and c:IsFaceup() and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) -end -function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local opp=1-tp - local c=e:GetHandler() - if chk==0 then return not Duel.HasFlagEffect(tp,id) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) - and eg:IsExists(s.repfilter,1,nil,tp,opp) end - if Duel.SelectEffectYesNo(tp,c,96) then - Duel.Hint(HINT_CARD,0,id) - local g=eg:Filter(s.repfilter,nil,tp,opp) - if #g>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - g=g:Select(tp,1,1,nil) - Duel.HintSelection(g) - end - e:SetLabelObject(g) - c:SetStatus(STATUS_DESTROY_CONFIRMED,true) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - return true - else return false end -end -function s.repop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - c:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(c,REASON_EFFECT|REASON_REPLACE) -end -function s.plfilter(c,tp) - return c:IsPendulumMonster() and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 -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_MZONE) and s.plfilter(chkc,tp) end - local c=e:GetHandler() - if chk==0 then return Duel.CheckPendulumZones(tp) - and Duel.IsExistingTarget(s.plfilter,tp,LOCATION_MZONE,0,1,nil,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - Duel.SelectTarget(tp,s.plfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) - and Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then - local c=e:GetHandler() - --It cannot activate its Pendulum Effects this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - end -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_PZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_PZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - Duel.SelectTarget(tp,nil,tp,LOCATION_PZONE,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 - --It cannot be destroyed by your opponent's card effects this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3060) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetValue(aux.indoval) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101305026.lua b/pre-release/c101305026.lua deleted file mode 100644 index 31d97d3fbd..0000000000 --- a/pre-release/c101305026.lua +++ /dev/null @@ -1,83 +0,0 @@ ---グレイレイヤー ---Gray Layer ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can Tribute this card and reveal 1 Machine monster in your hand; add 1 Machine monster from your Deck to your hand with a different Attribute than the revealed monster, then if you added a monster with 1200 or less ATK, you can Special Summon 1 Machine monster from 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_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(Cost.AND(Cost.SelfTribute,Cost.Reveal(s.revealfilter,false,1,1,function(e,tp,og) e:SetLabel(og:GetFirst():GetAttribute()) end))) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If a monster(s) in your possession is destroyed by card effect, while this card is in your GY: You can banish this card; destroy 1 card on the field - 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_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.descon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -function s.revealfilter(c,e,tp) - return c:IsRace(RACE_MACHINE) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttribute()) -end -function s.thfilter(c,attr) - return c:IsRace(RACE_MACHINE) and c:IsAttributeExcept(attr) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -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,e:GetLabel()):GetFirst() - if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,sc) - Duel.ShuffleHand(tp) - if sc:IsAttackBelow(1200) and Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,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_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - end -end -function s.desconfilter(c,tp) - return (c:IsPreviousLocation(LOCATION_MZONE) or (c:IsMonsterCard() and not c:IsPreviousLocation(LOCATION_ONFIELD))) - and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.desconfilter,1,nil,tp) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,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,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305027.lua b/pre-release/c101305027.lua deleted file mode 100644 index 21a55560c6..0000000000 --- a/pre-release/c101305027.lua +++ /dev/null @@ -1,89 +0,0 @@ ---黒き混沌の魔術師ブラック・カオス ---Black Chaos the Dark Chaos Magician ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Unaffected by your opponent's activated effects, unless they target this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(s.immval) - c:RegisterEffect(e1) - --Spells/Traps you control cannot be destroyed, or banished, by your opponent's card effects - local e2a=Effect.CreateEffect(c) - e2a:SetType(EFFECT_TYPE_FIELD) - e2a:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e2a:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2a:SetRange(LOCATION_MZONE) - e2a:SetTargetRange(LOCATION_ONFIELD,0) - e2a:SetTarget(function(e,c) return c:IsSpellTrap() end) - e2a:SetValue(aux.indoval) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2b:SetCode(EFFECT_CANNOT_REMOVE) - e2b:SetTargetRange(0,1) - e2b:SetTarget(function(e,c,tp,r) return c:IsSpellTrap() and c:IsControler(e:GetHandlerPlayer()) and c:IsOnField() and r==REASON_EFFECT end) - e2b:SetValue(1) - c:RegisterEffect(e2b) - --If this card is Special Summoned: You can add 1 Spell from your GY to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,0}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) - --You can target 1 card your opponent controls; banish it (face-down) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,{id,1}) - e4:SetTarget(s.bantg) - e4:SetOperation(s.banop) - c:RegisterEffect(e4) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.immval(e,re) - if not (re:IsActivated() and e:GetOwnerPlayer()==1-re:GetOwnerPlayer()) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - return not (tg and tg:IsContains(e:GetHandler())) -end -function s.thfilter(c) - return c:IsSpell() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,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,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToRemove(tp,POS_FACEDOWN) end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil,tp,POS_FACEDOWN) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil,tp,POS_FACEDOWN) - 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_FACEDOWN,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305028.lua b/pre-release/c101305028.lua deleted file mode 100644 index 3660da9d87..0000000000 --- a/pre-release/c101305028.lua +++ /dev/null @@ -1,74 +0,0 @@ ---光と闇の戦士カオス・ソルジャー ---Black Luster Soldier - Soldier of Light and Darkness ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Cannot be destroyed by battle - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(1) - c:RegisterEffect(e1) - --Unaffected by your opponent's activated effects, unless they target this card - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(s.immval) - c:RegisterEffect(e2) - --If this card is Special Summoned: You can target 1 card your opponent controls; banish it - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_REMOVE) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,{id,0}) - e3:SetTarget(s.bantg) - e3:SetOperation(s.banop) - c:RegisterEffect(e3) - --When this card destroys an opponent's monster by battle: You can make this card gain 1500 ATK, and if you do, it can make a second attack in a row - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_ATKCHANGE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_BATTLE_DESTROYING) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(s.atkcon) - e4:SetOperation(s.atkop) - c:RegisterEffect(e4) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.immval(e,re) - if not (re:IsActivated() and e:GetOwnerPlayer()==1-re:GetOwnerPlayer()) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end - local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - return not (tg and tg:IsContains(e:GetHandler())) -end -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() 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 -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) and c:CanChainAttack() -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToBattle() and c:UpdateAttack(1500)>0 then - Duel.ChainAttack() - end -end \ No newline at end of file diff --git a/pre-release/c101305029.lua b/pre-release/c101305029.lua deleted file mode 100644 index ac33963962..0000000000 --- a/pre-release/c101305029.lua +++ /dev/null @@ -1,91 +0,0 @@ ---混沌の三幻魔 ---Phantasmal Sacred Beasts of Chaos ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 3 Level 10 monsters that cannot be Normal Summoned/Set - Fusion.AddProcFunRep(c,s.matfilter,3,true) - --Must be either Fusion Summoned, or Special Summoned (from your Extra Deck) by sending the above cards you control to the GY - c:AddMustBeFusionSummoned() - Fusion.AddContactProc(c,s.contactfil,s.contactop,false,nil,1) - --You can only Special Summon "Phantasmal Sacred Beasts of Chaos" once per turn this way, no matter which method you use - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_SPSUMMON_SUCCESS) - e0:SetCondition(s.regcon) - e0:SetOperation(s.regop) - c:RegisterEffect(e0) - --The first two times this card would be destroyed by card effect each turn, it is not destroyed - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(2) - e1:SetValue(function(e,re,r) return (r&REASON_EFFECT)>0 end) - c:RegisterEffect(e1) - --Once per Chain and thrice per turn (Quick Effect): You can target 1 face-up monster your opponent controls; negate its effects (until the end of this turn), then you can gain LP equal to half its ATK - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE+CATEGORY_RECOVER) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(3) - e2:SetCost(Cost.SoftOncePerChain(id)) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - 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) - return c:IsLevel(10) and not c:IsSummonableCard() -end -function s.contactfil(tp) - return Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,nil) -end -function s.contactop(g) - Duel.SendtoGrave(g,REASON_COST|REASON_MATERIAL) -end -function s.regcon(e) - local c=e:GetHandler() - return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - --You can only Special Summon "Phantasmal Sacred Beasts of Chaos" once per turn this way, no matter which method you use - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCode(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -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 chkc:IsNegatableMonster() end - if chk==0 then return Duel.IsExistingTarget(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local tc=Duel.SelectTarget(tp,Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - Duel.SetTargetPlayer(tp) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,math.floor(tc:GetAttack()/2)) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then - --Negate its effects (until the end of this turn) - tc:NegateEffects(e:GetHandler(),RESETS_STANDARD_PHASE_END) - Duel.AdjustInstantly(tc) - local lp=math.floor(tc:GetAttack()/2) - if lp>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.BreakEffect() - Duel.Recover(p,lp,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101305030.lua b/pre-release/c101305030.lua deleted file mode 100644 index 5e522227ea..0000000000 --- a/pre-release/c101305030.lua +++ /dev/null @@ -1,70 +0,0 @@ ---召喚獣ソラト ---Invoked Sorath ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Aleister" monster + 1 FIRE or WIND monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ALEISTER),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_FIRE|ATTRIBUTE_WIND)) - --During the Main Phase (Quick Effect): You can target 1 Level 6 or lower monster in either GY; Special Summon it to your field in Defense Position, but negate its effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e1) - --If this card is in your GY: You can Fusion Summon 1 "Invoked" Fusion Monster from your Extra Deck, by banishing its materials from your field and/or GY, including this card in the GY - local fusion_params={ - fusfilter=function(c) return c:IsSetCard(SET_INVOKED) end, - matfilter=aux.FALSE, - extrafil=s.fextra, - extraop=Fusion.BanishMaterial, - gc=Fusion.ForcedHandler, - extratg=s.extratg - } - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2) -end -s.listed_series={SET_ALEISTER,SET_INVOKED} -s.material_setcode={SET_ALEISTER} -function s.spfilter(c,e,tp) - return c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,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) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then - --Negate its effects - tc:NegateEffects(e:GetHandler()) - end - Duel.SpecialSummonComplete() -end -function s.fextra(e,tp,mg) - local locations=not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and (LOCATION_MZONE|LOCATION_GRAVE) or LOCATION_MZONE - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,locations,0,nil) -end -function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,tp,LOCATION_MZONE|LOCATION_GRAVE) -end \ No newline at end of file diff --git a/pre-release/c101305031.lua b/pre-release/c101305031.lua deleted file mode 100644 index 6356aa58a3..0000000000 --- a/pre-release/c101305031.lua +++ /dev/null @@ -1,88 +0,0 @@ ---召喚獣ベイバロン ---Invoked Babalon ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Aleister" monster + 1 LIGHT or EARTH monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ALEISTER),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT|ATTRIBUTE_EARTH)) - --If this card is Special Summoned: You can add 1 "Virakam the Artificial Spirit" or "Magical Name - "Rosa Mundi"" from your Deck to your hand, then you can banish 1 monster from either GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE) - 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.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --You can banish this card from your GY, then target 1 Fusion Monster you control; all monsters your opponent currently controls lose ATK equal to that monster's until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_ATKCHANGE) - 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.atktg) - e2:SetOperation(s.atkop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ALEISTER} -s.material_setcode={SET_ALEISTER} -s.listed_names={101305017,101305070} --"Virakam the Artificial Spirit", "Magical Name - "Rosa Mundi"" -function s.thfilter(c) - return c:IsCode(101305017,101305070) 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_REMOVE,nil,1,PLAYER_EITHER,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,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.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToRemove),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,aux.AND(Card.IsMonster,Card.IsAbleToRemove),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) - if #rg>0 then - Duel.HintSelection(rg) - Duel.BreakEffect() - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - end - end - 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:IsFusionMonster() and chkc:HasNonZeroAttack() end - if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsFusionMonster,Card.HasNonZeroAttack),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,aux.AND(Card.IsFusionMonster,Card.HasNonZeroAttack),tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,tp,g:GetFirst():GetAttack()) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end - local atk=tc:GetAttack() - if atk<=0 then return end - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if #g==0 then return end - local c=e:GetHandler() - for oc in g:Iter() do - --All monsters your opponent currently controls lose ATK equal to that monster's until the end of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(-atk) - e1:SetReset(RESETS_STANDARD_PHASE_END) - oc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101305032.lua b/pre-release/c101305032.lua deleted file mode 100644 index c70e46e034..0000000000 --- a/pre-release/c101305032.lua +++ /dev/null @@ -1,67 +0,0 @@ ---召喚獣オーケアノス ---Invoked Okeanos ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Naterials: 1 "Aleister" monster + 1 DARK or WATER monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ALEISTER),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK|ATTRIBUTE_WATER)) - --While this card is in the Main Monster Zone, your opponent's monsters cannot target monsters for attacks, except this one - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e1:SetRange(LOCATION_MMZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetValue(function(e,c) return c~=e:GetHandler() end) - c:RegisterEffect(e1) - --While this card is in the Extra Monster Zone, any monster sent to your opponent's GY is banished instead - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e2:SetRange(LOCATION_EMZONE) - e2:SetTarget(s.rmtarget) - e2:SetTargetRange(LOCATION_ALL,LOCATION_ALL) - e2:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e2) - --You can banish this card from your GY, then target 1 Fusion Monster you control; it can attack directly this turn. You can only use this effect of "Invoked Okeanos" once per turn - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,id) - e3:SetCondition(function(e,tp) return Duel.IsAbleToEnterBP() end) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.diratktg) - e3:SetOperation(s.diratkop) - c:RegisterEffect(e3) -end -s.listed_series={SET_ALEISTER} -s.material_setcode={SET_ALEISTER} -function s.rmtarget(e,c) - local tp=e:GetHandlerPlayer() - return not (c:IsOwner(tp) or c:IsSpellTrap() or c:IsLocation(LOCATION_OVERLAY)) and Duel.IsPlayerCanRemove(tp,c) -end -function s.diratktgfilter(c) - return c:IsFusionMonster() and c:IsFaceup() and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) -end -function s.diratktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.diratktgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.diratktgfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - Duel.SelectTarget(tp,s.diratktgfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.diratkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - --It can attack directly this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(3205) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101305033.lua b/pre-release/c101305033.lua deleted file mode 100644 index d7b53a99fd..0000000000 --- a/pre-release/c101305033.lua +++ /dev/null @@ -1,88 +0,0 @@ ---超越召喚獣アイオーン ---Invoked Transcendence Aeon ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2+ Fusion Monsters with different Attributes - Fusion.AddProcMixRep(c,true,true,s.matfilter,2,99) - --If this card is Fusion Summoned: You can banish cards from the field and/or GYs, up to the number of materials used, then if you used 3 or more, you can look at your opponent's Extra Deck, and if you do, banish up to 3 cards from it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - 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() end) - e1:SetTarget(s.bantg) - e1:SetOperation(s.banop) - c:RegisterEffect(e1) - --(Quick Effect): You can declare 1 Attribute; all other monsters currently on the field become that Attribute until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.attrtg) - e2:SetOperation(s.attrop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -function s.matfilter(c,fc,sumtype,tp,sub,mg,sg) - return c:IsType(TYPE_FUSION,fc,sumtype,tp) and - (not sg or sg:FilterCount(aux.TRUE,c)==0 or not sg:IsExists(Card.IsAttribute,1,c,c:GetAttribute(fc,sumtype,tp),fc,sumtype,tp)) -end -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk) - local material_count=e:GetHandler():GetMaterialCount() - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,nil) - if chk==0 then return material_count>0 and #g>0 end - e:SetLabel(material_count) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,PLAYER_EITHER,LOCATION_ONFIELD|LOCATION_GRAVE) - if material_count>=3 then - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,3,1-tp,LOCATION_EXTRA) - end -end -function s.banop(e,tp,eg,ep,ev,re,r,rp) - local material_count=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,material_count,nil) - if #g==0 then return end - Duel.HintSelection(g) - if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 and material_count>=3 then - local extrag=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil) - if #extrag>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.ConfirmCards(tp,extrag) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg=extrag:Select(tp,1,3,nil) - if #sg>0 then - Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) - end - Duel.ShuffleExtra(1-tp) - end - end -end -function s.attrtg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) - if chk==0 then return #g>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) - e:SetLabel(Duel.AnnounceAnotherAttribute(g,tp)) -end -function s.attrop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - local attr=e:GetLabel() - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,exc) - for tc in g:Iter() do - --All other monsters currently on the field become that Attribute until the end of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetValue(attr) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101305034.lua b/pre-release/c101305034.lua deleted file mode 100644 index daf7155c9a..0000000000 --- a/pre-release/c101305034.lua +++ /dev/null @@ -1,92 +0,0 @@ ---わくどきメルフィーズ ---Excited Melffys ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Melffy" monster + 1 Beast monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MELFFY),aux.FilterBoolFunctionEx(Card.IsRace,RACE_BEAST)) - --If this card is Fusion Summoned: You can target an equal number of "Melffy" cards you control and cards your opponent controls; return them to the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND) - 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) return e:GetHandler():IsFusionSummoned() end) - e1:SetTarget(s.rthtg) - e1:SetOperation(s.rthop) - c:RegisterEffect(e1) - --If your opponent Normal or Special Summons a monster(s) (except during the Damage Step), or if an opponent's monster targets this card for an attack: You can target 1 Beast monster in your GY; decrease this card's Level by 2, and if you do, Special Summon that monster - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_LVCHANGE+CATEGORY_SPECIAL_SUMMON) - e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetRange(LOCATION_MZONE) - e2a:SetCountLimit(1,{id,1}) - e2a:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e2a:SetTarget(s.sptg) - e2a:SetOperation(s.spop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - local e2c=e2a:Clone() - e2c:SetCode(EVENT_BE_BATTLE_TARGET) - e2c:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==e:GetHandler() end) - c:RegisterEffect(e2c) -end -s.listed_series={SET_MELFFY} -s.material_setcode={SET_MELFFY} -function s.rthandrescon(maxc) - return function(sg,e,tp,mg) - local ct1=sg:FilterCount(Card.IsControler,nil,tp) - local ct2=#sg-ct1 - return ct1==ct2,ct1>maxc or ct2>maxc - end -end -function s.rthfilter(c,opp) - return (c:IsControler(opp) or (c:IsSetCard(SET_MELFFY) and c:IsFaceup())) and c:IsAbleToHand() -end -function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local opp=1-tp - if chk==0 then return Duel.IsExistingTarget(s.rthfilter,tp,LOCATION_ONFIELD,0,1,nil,opp) - and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetTargetGroup(s.rthfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,opp) - local ct=g:FilterCount(Card.IsControler,nil,tp) - local rescon=s.rthandrescon(math.min(ct,#g-ct)) - local tg=aux.SelectUnselectGroup(g,e,tp,2,#g,rescon,1,tp,HINTMSG_RTOHAND,rescon) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,#tg,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 -function s.spfilter(c,e,tp) - return c:IsRace(RACE_BEAST) 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 s.spfilter(chkc,e,tp) end - if chk==0 then return c:HasLevel() and c:IsLevelAbove(3) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,c,1,tp,-2) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,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 c:IsLevelAbove(3) and c:IsFaceup() and c:UpdateLevel(-2)==-2 - 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/c101305035.lua b/pre-release/c101305035.lua deleted file mode 100644 index 21d783c286..0000000000 --- a/pre-release/c101305035.lua +++ /dev/null @@ -1,57 +0,0 @@ ---誇り高き耀聖の詩-エルフェンノーツ ---June Pride - Elfnotes ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1 Spellcaster non-Tuner - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(Card.IsRace,RACE_SPELLCASTER),1,1) - --While this card is in the center Main Monster Zone, neither player can declare attacks, except with monsters in the center Main Monster Zones - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetCondition(function(e) return e:GetHandler():IsSequence(2) end) - e1:SetTarget(function(e,c) return not c:IsSequence(2) end) - c:RegisterEffect(e1) - --During the Main Phase, if this card is in the center Main Monster Zone (Quick Effect): You can return it to the Extra Deck, and if you do, Special Summon up to 1 "Elfnote" monster each from your hand, Deck, and GY. You can only use this effect of "June Pride - Elfnotes" once per turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e) return Duel.IsMainPhase() and e:GetHandler():IsSequence(2) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -s.listed_series={SET_ELFNOTE} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ELFNOTE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToExtra() and Duel.GetMZoneCount(tp,c)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_EXTRA) then - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) - ft=math.min(ft,#g,3) - if ft<=0 then return end - 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.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c101305036.lua b/pre-release/c101305036.lua deleted file mode 100644 index cd95aa8e42..0000000000 --- a/pre-release/c101305036.lua +++ /dev/null @@ -1,74 +0,0 @@ ---無現壊収 ヌルゲイナー ---Glitch Clutch Nullgainer -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 Synchro Summoned: You can add 1 Level 8 or higher monster with 0 ATK 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) - --You can target 1 monster with 0 ATK in your GY; Special Summon it, but negate its effects, also it cannot be used as material for a Fusion, Synchro, Xyz, or Link Summon - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.thfilter(c) - return c:IsLevelAbove(8) and c:IsAttack(0) 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) - return c:IsAttack(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - local c=e:GetHandler() - --Negate its effects, also it cannot be used as material for a Fusion, Synchro, Xyz, or Link Summon - tc:NegateEffects(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,2)) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+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(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c101305037.lua b/pre-release/c101305037.lua deleted file mode 100644 index d69cd09fd5..0000000000 --- a/pre-release/c101305037.lua +++ /dev/null @@ -1,96 +0,0 @@ ---幻影騎士団マレヴォレンスサイス ---The Phantom Knights of Malevolent Scythe ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 3 DARK monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),3,2) - --You can detach 1 material from this card; Special Summon 1 "The Phantom Knights" monster from your Deck - 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:SetCost(Cost.DetachFromSelf(1)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If you Xyz Summon an "Xyz Dragon" monster while this card is in the Monster Zone: You can add 1 "Rank-Up-Magic" Spell 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_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.deckthcon) - e2:SetTarget(s.deckthtg) - e2:SetOperation(s.deckthop) - c:RegisterEffect(e2) - --If this card is destroyed: You can add 1 of your banished "The Phantom Knights" cards to your hand, except an Xyz Monster - 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_DESTROYED) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.banthtg) - e3:SetOperation(s.banthop) - c:RegisterEffect(e3) -end -s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON,SET_RANK_UP_MAGIC} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) 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.deckthconfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsXyzSummoned() and c:IsSetCard(SET_XYZ_DRAGON) and c:IsFaceup() -end -function s.deckthcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.deckthconfilter,1,nil,tp) -end -function s.deckthfilter(c) - return c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsSpell() 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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - end -end -function s.banthfilter(c) - return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and not c:IsXyzMonster() and c:IsFaceup() and c:IsAbleToHand() -end -function s.banthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.banthfilter,tp,LOCATION_REMOVED,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED) -end -function s.banthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.banthfilter,tp,LOCATION_REMOVED,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/c101305038.lua b/pre-release/c101305038.lua deleted file mode 100644 index 57b91ba9f3..0000000000 --- a/pre-release/c101305038.lua +++ /dev/null @@ -1,76 +0,0 @@ ---メルフィーゴッド・マミィ ---Melffy God Mommy ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 3+ Level 2 Beast monsters, OR 1 "Melffy Mommy" you control - Xyz.AddProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_BEAST),2,3,s.altxyzmatfilter,aux.Stringid(id,0),Xyz.InfiniteMats,s.altxyzop) - --If this card is Special Summoned: You can add 1 "Melffy" Spell/Trap from your Deck or GY to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - 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:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Gains ATK equal to the combined ATK and DEF of all "Melffy" monsters attached to it - 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) - --You can detach 5 materials from this card; return all cards your opponent controls to the hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCost(Cost.DetachFromSelf(5)) - e3:SetTarget(s.rthtg) - e3:SetOperation(s.rthop) - c:RegisterEffect(e3) -end -s.listed_names={76833149} --"Melffy Mommy" -s.listed_series={SET_MELFFY} -function s.altxyzmatfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,76833149) -end -function s.altxyzop(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_MELFFY) 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|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.atkval(e,c) - local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsSetCard,nil,SET_MELFFY) - return g:GetSum(Card.GetAttack)+g:GetSum(Card.GetDefense) -end -function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0) -end -function s.rthop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305039.lua b/pre-release/c101305039.lua deleted file mode 100644 index 71fa7187d1..0000000000 --- a/pre-release/c101305039.lua +++ /dev/null @@ -1,77 +0,0 @@ ---無垢なる祈りの獄神使 ---Power Patron Envoy of Pure Prayers ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 non-Link Monsters - Link.AddProcedure(c,s.matfilter,2) - --If this card is Link Summoned and you have a "Power Patron" monster in your GY: You can add 1 "Theorealize" card 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) - --During the Main Phase, if you control another DARK Fairy monster, you can (Quick Effect): Immediately after this effect resolves, Link Summon using materials you control, including this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.linkcon) - e2:SetTarget(s.linktg) - e2:SetOperation(s.linkop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) -end -s.listed_series={SET_POWER_PATRON,SET_THEOREALIZE} -function s.matfilter(c,lc,sumtyp,sumpl) - return not c:IsType(TYPE_LINK,lc,sumtyp,sumpl) -end -function s.thconfilter(c) - return c:IsSetCard(SET_POWER_PATRON) and c:IsMonster() -end -function s.thfilter(c) - return c:IsSetCard(SET_THEOREALIZE) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thconfilter,tp,LOCATION_GRAVE,0,1,nil) - and 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.linkconfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FAIRY) and c:IsFaceup() -end -function s.linkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.linkconfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) -end -function s.linktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.linkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) or c:IsControler(1-tp) then return end - local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,c) - if #g>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - Duel.LinkSummon(tp,sg:GetFirst(),c) - end -end \ No newline at end of file diff --git a/pre-release/c101305040.lua b/pre-release/c101305040.lua deleted file mode 100644 index d2f3a152b3..0000000000 --- a/pre-release/c101305040.lua +++ /dev/null @@ -1,84 +0,0 @@ ---S-Force ナイトスレイヤー ---S-Force Nightslayer ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 monsters, including an "S-Force" monster - Link.AddProcedure(c,nil,2,2,s.lcheck) - --If this card is Special Summoned: You can add 1 "S-Force" Spell/Trap from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - 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.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --(Quick Effect): You can banish this card you control and 1 "S-Force" card from your hand; Special Summon 1 "S-Force" monster from your Deck or Extra Deck, except "S-Force Nightslayer" - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.AND(Cost.Replaceable(s.spcost,s.extracon),Cost.SelfBanish)) - 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.listed_names={id} -s.listed_series={SET_S_FORCE} -function s.lcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,SET_S_FORCE,lc,sumtype,tp) -end -function s.thfilter(c) - return c:IsSetCard(SET_S_FORCE) 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.spcostfilter(c) - return c:IsSetCard(SET_S_FORCE) and c:IsAbleToRemoveAsCost() -end -function s.spfilter(c,e,tp,hc) - if c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,hc)<=0 then return false end - if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,hc,c)<=0 then return false end - return c:IsSetCard(SET_S_FORCE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,c) - Duel.Remove(g+c,POS_FACEUP,REASON_COST) - return false --avoid performing Cost.SelfBanish if the cost isn't replaced, since the handler is already banished in this function -end -function s.extracon(base,e,tp,eg,ep,ev,re,r,rp,exc) - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,exc,e,tp,e:GetHandler()) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,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,true,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101305041.lua b/pre-release/c101305041.lua deleted file mode 100644 index adc39be30f..0000000000 --- a/pre-release/c101305041.lua +++ /dev/null @@ -1,69 +0,0 @@ ---S-Force ミスティファイ ---S-Force Mystify ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ monsters, including an "S-Force" monster - Link.AddProcedure(c,nil,2,3,s.lcheck) - --While an opponent's monster is in this card's column, your opponent cannot target this card with card effects, also they cannot Special Summon with activated monster effects - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_SINGLE) - e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1a:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1a:SetRange(LOCATION_MZONE) - e1a:SetCondition(s.columncon) - e1a:SetValue(aux.tgoval) - c:RegisterEffect(e1a) - local e1b=Effect.CreateEffect(c) - e1b:SetType(EFFECT_TYPE_FIELD) - e1b:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1b:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1b:SetRange(LOCATION_MZONE) - e1b:SetTargetRange(0,1) - e1b:SetCondition(s.columncon) - e1b:SetTarget(function(e,c,sump,sumtype,sumpos,targetp,se) return se and se:IsActivated() and se:IsMonsterEffect() end) - c:RegisterEffect(e1b) - --(Quick Effect): You can target 1 monster on the field; move it to another of its controller's Main Monster Zones - 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:SetCountLimit(1,id) - e2:SetTarget(s.mvtg) - e2:SetOperation(s.mvop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -function s.lcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,SET_S_FORCE,lc,sumtype,tp) -end -function s.columnfilter(c,opp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(opp) -end -function s.columncon(e) - return e:GetHandler():GetColumnGroup():IsExists(s.columnfilter,1,nil,1-e:GetHandlerPlayer()) -end -function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local own_loc=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and LOCATION_MZONE or 0 - local opp_loc=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and LOCATION_MZONE or 0 - if chkc then return chkc:IsLocation(LOCATION_MZONE) and (chkc:IsControler(tp) and (own_loc>0) or (opp_loc>0)) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,own_loc,opp_loc,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) - Duel.SelectTarget(tp,nil,tp,own_loc,opp_loc,1,1,nil) -end -function s.mvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end - local player=tc:GetControler() - if Duel.GetLocationCount(player,LOCATION_MZONE)>0 then - local is_own=player==tp - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) - local zone=Duel.SelectDisableField(tp,1,is_own and LOCATION_MZONE or 0,is_own and 0 or LOCATION_MZONE,0) - if not is_own then zone=zone>>16 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) - Duel.MoveSequence(tc,math.log(zone,2)) - end -end \ No newline at end of file diff --git a/pre-release/c101305042.lua b/pre-release/c101305042.lua deleted file mode 100644 index 3ec097b153..0000000000 --- a/pre-release/c101305042.lua +++ /dev/null @@ -1,74 +0,0 @@ ---道化の一座 ドリッシュ ---Clown Crew Drish ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 Ritual, Fusion, Synchro, Xyz, and/or Pendulum Monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_RITUAL|TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ|TYPE_PENDULUM),2) - --Your Tribute Summoned monsters can make a second attack during each Battle Phase - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsTributeSummoned)) - e1:SetValue(1) - 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 Drish" 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 -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.IsLinkMonster,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.IsPlayerCanDraw(tp) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil)) - or (Duel.IsPlayerCanDraw(1-tp) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND,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_TODECK|CATEGORY_DRAW) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Return all Link Monsters on the field and in the GYs to the Extra Deck - local g=Duel.GetMatchingGroup(aux.AND(Card.IsLinkMonster,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 - --● Each player shuffles their entire hand into the Deck, then they draw the same number of cards they shuffled - local turn_player=Duel.GetTurnPlayer() - local step=turn_player==0 and 1 or -1 - for p=turn_player,1-turn_player,step do - local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) - if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and Duel.IsPlayerCanDraw(p) then - local draw_count=Duel.GetOperatedGroup():FilterCount(Card.IsPreviousControler,nil,p) - if draw_count>0 then - Duel.ShuffleDeck(p) - Duel.BreakEffect() - Duel.Draw(p,draw_count,REASON_EFFECT) - end - end - end - end -end diff --git a/pre-release/c101305043.lua b/pre-release/c101305043.lua deleted file mode 100644 index 66ded9a6fc..0000000000 --- a/pre-release/c101305043.lua +++ /dev/null @@ -1,107 +0,0 @@ ---ぜんなのついなぎひめ ---Zenna-no-Tsuinagihime ---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) - --You can also use 1 monster in your hand as material to Link Summon this card - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_EXTRA_MATERIAL) - e0:SetRange(LOCATION_EXTRA) - e0:SetTargetRange(1,0) - e0:SetOperation(function(c,e,tp,sg,mg,lc,og,chk) return sg:FilterCount(Card.HasFlagEffect,nil,id)<=1 end) - e0:SetValue(s.extraval) - c:RegisterEffect(e0) - --If this card is Link Summoned: You can send 1 monster from your Deck to the GY, or if this card was Link Summoned using only monsters you control, you can send 1 monster from your Extra Deck to the GY instead - 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_SPSUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) - e1a:SetTarget(s.tgtg) - e1a:SetOperation(s.tgop) - c:RegisterEffect(e1a) - local e1b=Effect.CreateEffect(c) - e1b:SetType(EFFECT_TYPE_SINGLE) - e1b:SetCode(EFFECT_MATERIAL_CHECK) - e1b:SetValue(s.matcheck) - e1b:SetLabelObject(e1a) - c:RegisterEffect(e1b) - --During your next Standby Phase after this card was sent from the field to the GY: You can add 1 monster from your GY to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND) - e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2a:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2a:SetRange(LOCATION_GRAVE) - e2a:SetCountLimit(1,{id,1}) - e2a:SetCondition(function(e,tp) local c=e:GetHandler() return Duel.IsTurnPlayer(tp) and c:HasFlagEffect(id) and (c:GetFlagEffectLabel(id)==1 or c:GetTurnID()~=Duel.GetTurnCount()) end) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=Effect.CreateEffect(c) - e2b:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e2b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2b:SetCode(EVENT_TO_GRAVE) - e2b:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) - e2b:SetOperation(function(e,tp) local ct=(Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY)) and 2 or 1 e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,ct,ct) end) - c:RegisterEffect(e2b) -end -function s.extraval(chk,summon_type,e,...) - if chk==0 then - local tp,sc=... - if summon_type~=SUMMON_TYPE_LINK or sc~=e:GetHandler() then - return Group.CreateGroup() - else - local g=Duel.GetMatchingGroup(aux.NOT(Card.HasFlagEffect),tp,LOCATION_HAND,0,nil,id) - for mc in g:Iter() do - mc:RegisterFlagEffect(id,0,0,1) - end - return g - end - elseif chk==2 then - local g=Duel.GetMatchingGroup(Card.HasFlagEffect,e:GetHandlerPlayer(),LOCATION_HAND,0,nil,id) - for mc in g:Iter() do - mc:ResetFlagEffect(id) - end - end -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - local locations=e:GetLabel()==0 and LOCATION_DECK or LOCATION_DECK|LOCATION_EXTRA - if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,locations,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,locations) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local locations=e:GetLabel()==0 and LOCATION_DECK or LOCATION_DECK|LOCATION_EXTRA - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,locations,0,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function s.matcheckfilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) -end -function s.matcheck(e,c) - local mg=c:GetMaterial() - e:GetLabelObject():SetLabel(mg:FilterCount(s.matcheckfilter,nil,e:GetHandlerPlayer())==#mg and 1 or 0) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToHand),tp,LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,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.AND(Card.IsMonster,Card.IsAbleToHand),tp,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/c101305044.lua b/pre-release/c101305044.lua deleted file mode 100644 index 2dc15d5147..0000000000 --- a/pre-release/c101305044.lua +++ /dev/null @@ -1,49 +0,0 @@ ---光と闇の儀式 ---Ritual of Light and Darkness ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Ritual Summon 1 "Black Chaos the Dark Chaos Magician" or "Black Luster Soldier - Soldier of Light and Darkness" from your hand, by Tributing monsters from your hand or field, and/or banishing monsters from your GY, whose total Levels equal or exceed its Level - Ritual.AddProcGreater{ - handler=c, - filter=function(c) return c:IsCode(101305027,101305028) end, - extrafil=function(e,tp) return Duel.GetMatchingGroup(aux.AND(Card.HasLevel,Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end, - extratg=s.extratg, - desc=aux.Stringid(id,0) - } - --If this card is in your GY: You can add both this card and 1 card that mentions "Ritual of Light and Darkness" from your GY to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={101305027,101305028,CARD_RITUAL_OF_LIGHT_AND_DARKNESS} --"Black Chaos the Dark Chaos Magician", "Black Luster Soldier - Soldier of Light and Darkness" -function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) -end -function s.thfilter(c) - return c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) 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:IsAbleToHand() - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE) -end -function s.thop(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_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,c) - if #g>0 then - g:AddCard(c) - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305045.lua b/pre-release/c101305045.lua deleted file mode 100644 index 77f7a2dc73..0000000000 --- a/pre-release/c101305045.lua +++ /dev/null @@ -1,98 +0,0 @@ ---混沌のマジック・ボックス ---Mystic Box of Chaos ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When your opponent activates a card or effect that targets another card(s) you control: Return 1 of those cards you control to the hand (if face-down, reveal it briefly to check), and if you do, destroy 1 card on the field, then you can Special Summon 1 monster that mentions "Ritual of Light and Darkness" from your hand, with a different name than the returned card, ignoring its Summoning conditions - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(s.thdescon) - e1:SetTarget(s.thdestg) - e1:SetOperation(s.thdesop) - c:RegisterEffect(e1) - --If this card in its owner's possession is destroyed by an opponent's card: You can Special Summon 1 Ritual Monster that mentions "Ritual of Light and Darkness" from your hand or Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.thdesconfilter(c,tp) - return c:IsControler(tp) and c:IsOnField() and c:IsAbleToHand() -end -function s.thdescon(e,tp,eg,ep,ev,re,r,rp) - if not (rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return tg and tg:IsExists(s.thdesconfilter,1,e:GetHandler(),tp) -end -function s.thdestg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.thconfilter(c,re,tp) - return c:IsRelateToEffect(re) and c:IsControler(tp) -end -function s.handspfilter(c,e,tp,code) - return c:IsMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and not c:IsCode(code) - and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.thdesop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(s.thconfilter,nil,re,tp) - if #tg==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local sc=tg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil):GetFirst() - if not sc then return end - if sc:IsFaceup() then - Duel.HintSelection(sc) - else - Duel.ConfirmCards(1-tp,sc) - end - if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then - Duel.ShuffleHand(sc:GetControler()) - local c=e:GetHandler() - local exc=c:IsRelateToEffect(e) and c or nil - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,exc) - if #g==0 then return end - Duel.HintSelection(g) - local code=sc:GetCode() - if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,nil,e,tp,code) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.handspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,code) - if #sg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) - end - end - end -end -function s.ritualspfilter(c,e,tp) - return c:IsRitualMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) -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.ritualspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|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.ritualspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101305046.lua b/pre-release/c101305046.lua deleted file mode 100644 index e73647c470..0000000000 --- a/pre-release/c101305046.lua +++ /dev/null @@ -1,101 +0,0 @@ ---カオスシルクハット ---Chaos Hats ---scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --When your opponent activates a monster effect, or a Normal Spell/Trap Card: Choose 3 Spells/Traps with different names from each other from your Deck and 1 monster in your Main Monster Zone that mentions "Ritual of Light and Darkness". Special Summon the chosen Spells/Traps in face-down Defense Position as Normal Monsters (Spellcaster/DARK/Level 8/ATK 0/DEF 0) and their names become "Chaos Hats" (even while face-down), Set the chosen monster, and shuffle them on the field, then your opponent's activated effect becomes "Destroy 1 face-down Defense Position monster your opponent controls" - 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_CHAINING) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS,id} -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and (re:IsMonsterEffect() or (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsNormalSpellTrap())) -end -function s.setfilter(c) - return c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and c:IsCanTurnSet() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_DECK,0,nil) - return aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,0) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,nil,TYPE_MONSTER|TYPE_NORMAL,0,0,8,RACE_SPELLCASTER,ATTRIBUTE_DARK,POS_FACEDOWN_DEFENSE) - and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_MMZONE,0,1,nil) - end - --Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end - local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_DECK,0,nil) - local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_SPSUMMON) - if #sg~=3 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local mc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_MMZONE,0,1,1,nil):GetFirst() - if not mc or mc:IsImmuneToEffect(e) then return end - Duel.HintSelection(mc) - for sc in sg:Iter() do - --Special Summon the chosen Spells/Traps in face-down Defense Position as Normal Monsters (Spellcaster/DARK/Level 8/ATK 0/DEF 0) and their names become "Chaos Hats" (even while face-down) - local e1=Effect.CreateEffect(sc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetValue(TYPE_NORMAL|TYPE_MONSTER) - e1:SetReset(RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_OVERLAY) - sc:RegisterEffect(e1,true) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_RACE) - e2:SetValue(RACE_SPELLCASTER) - sc:RegisterEffect(e2,true) - local e3=e1:Clone() - e3:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e3:SetValue(ATTRIBUTE_DARK) - sc:RegisterEffect(e3,true) - local e4=e1:Clone() - e4:SetCode(EFFECT_CHANGE_LEVEL) - e4:SetValue(8) - sc:RegisterEffect(e4,true) - local e5=e1:Clone() - e5:SetCode(EFFECT_SET_BASE_ATTACK) - e5:SetValue(0) - sc:RegisterEffect(e5,true) - local e6=e1:Clone() - e6:SetCode(EFFECT_SET_BASE_DEFENSE) - e6:SetValue(0) - sc:RegisterEffect(e6,true) - local e7=e1:Clone() - e7:SetCode(EFFECT_CHANGE_CODE) - e7:SetValue(id) - sc:RegisterEffect(e7,true) - end - Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEDOWN_DEFENSE) - Duel.ConfirmCards(1-tp,sg) - if mc:IsHasEffect(EFFECT_LIGHT_OF_INTERVENTION) then - Duel.ChangePosition(mc,POS_FACEUP_DEFENSE) - else - Duel.ChangePosition(mc,POS_FACEDOWN_DEFENSE) - mc:ClearEffectRelation() - end - sg:AddCard(mc) - Duel.ShuffleSetCard(sg) - --Your opponent's activated effect becomes "Destroy 1 face-down Defense Position monster your opponent controls" - Duel.BreakEffect() - local tg=Group.CreateGroup() - Duel.ChangeTargetCard(ev,tg) - Duel.ChangeChainOperation(ev,s.repop) -end -function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,0,LOCATION_MZONE,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305047.lua b/pre-release/c101305047.lua deleted file mode 100644 index 04e230e8c2..0000000000 --- a/pre-release/c101305047.lua +++ /dev/null @@ -1,66 +0,0 @@ ---三幻魔解放 ---Unleashing the Sacred Beasts ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Add 3 "Sacred Beast" monsters with different names from your Deck to your hand, then discard 2 cards - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.th3tg) - e1:SetOperation(s.th3op) - c:RegisterEffect(e1) - --If this card is in your GY, except the turn it was sent there: You can banish it; add 1 Level 10 Pyro, Thunder, or Fiend monster that cannot be Normal Summoned/Set 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_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(aux.exccon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.th1tg) - e2:SetOperation(s.th1op) - c:RegisterEffect(e2) -end -s.listed_series={SET_SACRED_BEAST} -function s.th3filter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsMonster() and c:IsAbleToHand() -end -function s.th3tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(s.th3filter,tp,LOCATION_DECK,0,nil) - return aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,0) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,3,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2) -end -function s.th3op(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.th3filter,tp,LOCATION_DECK,0,nil) - if #g<3 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_ATOHAND) - if #sg==3 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT|REASON_DISCARD,nil) - end -end -function s.th1filter(c) - return c:IsLevel(10) and c:IsRace(RACE_PYRO|RACE_THUNDER|RACE_FIEND) and not c:IsSummonableCard() - and c:IsAbleToHand() -end -function s.th1tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.th1filter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.th1op(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.th1filter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101305048.lua b/pre-release/c101305048.lua deleted file mode 100644 index 0d4ecb801a..0000000000 --- a/pre-release/c101305048.lua +++ /dev/null @@ -1,97 +0,0 @@ ---三幻魔の失楽園 ---Fallen Paradise of the Sacred Beasts ---Scripted by Eerie Code -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) - --Thrice per turn: You can send 3 other cards of the same type (Monster, Spell, or Trap) from your hand and/or face-up field to the GY, then you can Special Summon 1 "Sacred Beast" monster from your hand, Deck, GY, or banishment, and if you do, it is unaffected by your opponent's activated Spell/Trap effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_FZONE) - e1:SetCountLimit(3) - e1:SetTarget(s.gytg) - e1:SetOperation(s.gyop) - c:RegisterEffect(e1) - --If you control a "Sacred Beast" monster whose original Level is 10: You can draw 2 cards - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(s.drcon) - e2:SetTarget(s.drtg) - e2:SetOperation(s.drop) - c:RegisterEffect(e2) -end -s.listed_series={SET_SACRED_BEAST} -function s.gyfilter(c) - return c:IsAbleToGrave() and (c:IsFaceup() or not c:IsOnField()) -end -function s.rescon(sg,e,tp,mg) - return sg:GetClassCount(Card.GetMainCardType)==1 -end -local LOCATIONS_HAND_DECK_GRAVE_REMOVED=LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED -function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(s.gyfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,e:GetHandler()) - return aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) - end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,3,tp,LOCATION_HAND|LOCATION_ONFIELD) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATIONS_HAND_DECK_GRAVE_REMOVED) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_SACRED_BEAST) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) - and c:IsCanBeSpecialSummoned(e,0,tp,false,true) -end -function s.gyop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local g=Duel.GetMatchingGroup(s.gyfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,c) - if #g<3 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TOGRAVE) - if #sg==3 and Duel.SendtoGrave(sg,REASON_EFFECT)==3 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATIONS_HAND_DECK_GRAVE_REMOVED,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATIONS_HAND_DECK_GRAVE_REMOVED,0,1,1,nil,e,tp):GetFirst() - if not sc then return end - Duel.BreakEffect() - if Duel.SpecialSummonStep(sc,0,tp,tp,false,true,POS_FACEUP) then - --It is unaffected by your opponent's activated Spell/Trap effects - 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_IMMUNE_EFFECT) - e1:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() and te:IsSpellTrapEffect() end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1) - end - Duel.SpecialSummonComplete() - end -end -function s.drconfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsOriginalLevel(10) and c:IsFaceup() -end -function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.drconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(2) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -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 \ No newline at end of file diff --git a/pre-release/c101305049.lua b/pre-release/c101305049.lua deleted file mode 100644 index ad41f083d0..0000000000 --- a/pre-release/c101305049.lua +++ /dev/null @@ -1,83 +0,0 @@ ---三幻魔の霹靂 ---Skyfire of the Sacred Beast ---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 place 2 "Skyfire of the Sacred Beast" from your hand, Deck, and/or GY face-up on your field, then you can reveal 1 Level 10 "Sacred Beast" monster in your hand, then place 1 "Fallen Paradise of the Sacred Beasts" from your Deck face-up in your Field Zone - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.pltg) - e1:SetOperation(s.plop) - c:RegisterEffect(e1) - --During your opponent's End Phase, if this card is in your GY: You can add it to your 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:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={id,101305048} --"Fallen Paradise of the Sacred Beasts" -s.listed_series={SET_SACRED_BEAST} -function s.selfplfilter(c,tp) - return c:IsCode(id) and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=2 - and Duel.IsExistingMatchingCard(s.selfplfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,nil,tp) end -end -function s.revealfilter(c) - return c:IsLevel(10) and c:IsSetCard(SET_SACRED_BEAST) and not c:IsPublic() -end -function s.fieldplfilter(c,tp) - return c:IsCode(101305048) and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.selfplfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,2,nil,tp) - if #g==2 then - Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - Duel.MoveToField(g:GetNext(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - if Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingMatchingCard(s.fieldplfilter,tp,LOCATION_DECK,0,1,nil,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rg=Duel.SelectMatchingCard(tp,s.revealfilter,tp,LOCATION_HAND,0,1,1,nil) - if #rg==0 then return end - Duel.BreakEffect() - Duel.ConfirmCards(1-tp,rg) - Duel.ShuffleHand(tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.fieldplfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - if sc then - Duel.BreakEffect() - Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) - end - end - 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/c101305050.lua b/pre-release/c101305050.lua deleted file mode 100644 index f3876dae39..0000000000 --- a/pre-release/c101305050.lua +++ /dev/null @@ -1,89 +0,0 @@ ---天空城塞クーロン ---Kowloon, Citadel of the Sky ---scripted by pyrQ -local s,id=GetID() -local TOKEN_MECHBEAST=id+100 -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Monsters you control that were Normal or Special Summoned from the hand gain 500 ATK/DEF - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_FIELD) - e1a:SetCode(EFFECT_UPDATE_ATTACK) - e1a:SetRange(LOCATION_FZONE) - e1a:SetTargetRange(LOCATION_MZONE,0) - e1a:SetTarget(function(e,c) return (c:IsNormalSummoned() or c:IsSpecialSummoned()) and c:IsSummonLocation(LOCATION_HAND) end) - e1a:SetValue(500) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e1b) - --During your Main Phase: You can Special Summon 1 "Mechbeast Token" (Machine/EARTH/Level 6/ATK 2000/DEF 2000) to your opponent's field, and if you do, add 1 "Blitzclique" monster from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetTarget(s.tokentg) - e2:SetOperation(s.tokenop) - c:RegisterEffect(e2) - --If a card(s) is destroyed by your "Blitzclique" card's effect, 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_DESTROYED) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.selfthcon) - e3:SetTarget(s.selfthtg) - e3:SetOperation(s.selfthop) - c:RegisterEffect(e3) -end -s.listed_names={TOKEN_MECHBEAST} -s.listed_series={SET_BLITZCLIQUE} -function s.thfilter(c) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsMonster() and c:IsAbleToHand() -end -function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECHBEAST,0,TYPES_TOKEN,2000,2000,6,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP,1-tp) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.tokenop(e,tp,eg,ep,ev,re,r,rp) - local opp=1-tp - if Duel.GetLocationCount(opp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECHBEAST,0,TYPES_TOKEN,2000,2000,6,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP,opp) then return end - local token=Duel.CreateToken(tp,TOKEN_MECHBEAST) - if Duel.SpecialSummon(token,0,tp,opp,false,false,POS_FACEUP)>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(opp,g) - end - end -end -function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re and not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) - and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) -end -function s.selfthtg(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.selfthop(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/c101305051.lua b/pre-release/c101305051.lua deleted file mode 100644 index dd6dc6960d..0000000000 --- a/pre-release/c101305051.lua +++ /dev/null @@ -1,117 +0,0 @@ ---雷盟-ブレイクアウェイ ---Blitzclique - Breakaway ---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,0}) - 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) - --If a card(s) is destroyed by your "Blitzclique" card's effect, while this card is in your GY: You can add this card to your 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_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.selfthcon) - e2:SetTarget(s.selfthtg) - e2:SetOperation(s.selfthop) - c:RegisterEffect(e2) -end -s.listed_series={SET_BLITZCLIQUE} -function s.plfilter(c,tp) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsContinuousTrap() and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.descostfilter(c,hc) - return c:IsRace(RACE_THUNDER) and c:IsFaceup() and c:IsAbleToHandAsCost() - and Duel.IsExistingTarget(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c:GetEquipGroup()+c+hc) -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if c:IsLocation(LOCATION_HAND) then ft=ft-1 end - --● Place 1 "Blitzclique" Continuous Trap from your Deck face-up on your field - local b1=ft>0 and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) - --● Return 1 Thunder monster you control to the hand, then target 1 card on the field; destroy it - local b2=Duel.IsExistingMatchingCard(s.descostfilter,tp,LOCATION_MZONE,0,1,nil,c) - if chk==0 then return b1 or b2 end - local cd=e:GetChainData() - cd.choice=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - if cd.choice==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,s.descostfilter,tp,LOCATION_MZONE,0,1,1,nil,c) - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_COST) - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)==2 and chkc:IsOnField() and chkc~=c end - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - if c:IsLocation(LOCATION_HAND) then ft=ft-1 end - --● Place 1 "Blitzclique" Continuous Trap from your Deck face-up on your field - local b1=ft>0 and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) - --● Return 1 Thunder monster you control to the hand, then target 1 card on the field; destroy it - local b2=Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) - if chk==0 then return b1 or b2 end - local cd=e:GetChainData() - cd.choice=cd.choice - or Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - if cd.choice==1 then - e:SetCategory(0) - e:SetProperty(0) - elseif cd.choice==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,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local cd=e:GetChainData() - if cd.choice==1 then - --● Place 1 "Blitzclique" Continuous Trap from your Deck face-up on your field - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - if sc then - Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end - elseif cd.choice==2 then - --● Return 1 Thunder monster you control to the hand, then target 1 card on the field; destroy it - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end -function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re and not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) - and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) -end -function s.selfthtg(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.selfthop(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 diff --git a/pre-release/c101305052.lua b/pre-release/c101305052.lua deleted file mode 100644 index 545cd6a18a..0000000000 --- a/pre-release/c101305052.lua +++ /dev/null @@ -1,101 +0,0 @@ ---雷盟-ステップリーダ ---Blitzclique - Stepped Leader ---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) - --If a card(s) is destroyed by your "Blitzclique" card's effect: You can target 1 Thunder monster in your GY; add it to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_DESTROYED) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.thcon) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --During your Main Phase: You can Special Summon 1 Thunder monster from your hand, then destroy this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --If a card(s) is destroyed by your "Blitzclique" card's effect, 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,2)) - 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_DESTROYED) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.selfthcon) - e3:SetTarget(s.selfthtg) - e3:SetOperation(s.selfthop) - c:RegisterEffect(e3) -end -s.listed_series={SET_BLITZCLIQUE} -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) -end -function s.thfilter(c) - return c:IsRace(RACE_THUNDER) 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) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - 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 -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_THUNDER) 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) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - 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 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) then - Duel.BreakEffect() - Duel.Destroy(c,REASON_EFFECT) - end -end -function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re and not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) - and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) -end -function s.selfthtg(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.selfthop(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/c101305053.lua b/pre-release/c101305053.lua deleted file mode 100644 index f38f3053a5..0000000000 --- a/pre-release/c101305053.lua +++ /dev/null @@ -1,54 +0,0 @@ ---召喚魔術-「剣」 ---Invocation "Sword" ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters you control. If Summoning an "Invoked" Fusion Monster this way, you can also return banished monsters to the GY as material - local e1=Fusion.CreateSummonEff({ - handler=c, - matfilter=Fusion.OnFieldMat, - extrafil=s.fextra, - }) - e1:SetCountLimit(1,{id,0}) - 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: You can target 1 "Aleister" monster or "Invocation" in your GY; shuffle this card into the Deck, and if you do, add the targeted card to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) -end -s.listed_series={SET_INVOKED,SET_ALEISTER} -s.listed_names={CARD_INVOCATION} -function s.checkmat(tp,sg,fc) - return fc:IsSetCard(SET_INVOKED) or not sg:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) -end -function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup),tp,LOCATION_REMOVED,LOCATION_REMOVED,nil),s.checkmat -end -function s.thfilter(c) - return ((c:IsSetCard(SET_ALEISTER) and c:IsMonster()) or c:IsCode(CARD_INVOCATION)) and c:IsAbleToHand() -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end - 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_TODECK,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) - and tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305054.lua b/pre-release/c101305054.lua deleted file mode 100644 index 5653501e97..0000000000 --- a/pre-release/c101305054.lua +++ /dev/null @@ -1,99 +0,0 @@ ---神霊剣アイワス ---Spirit Sword Aiwass ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects; you cannot declare attacks for the rest of this turn, except with Fusion Monsters - 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_names={101305016} --"Aiwass the Spirit of the Law" -s.listed_series={SET_ALEISTER} -function s.spfilter(c,e,tp) - return c:IsCode(101305016) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.tgbanfilter(c) - return c:IsSetCard(SET_ALEISTER) and c:IsMonster() and (c:IsAbleToGrave() or c:IsAbleToRemove()) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - --● Special Summon 1 "Aiwass the Spirit of the Law" from your Deck or GY - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) - --● Send to the GY, or banish, 1 "Aleister" monster from your Deck - local b2=Duel.IsExistingMatchingCard(s.tgbanfilter,tp,LOCATION_DECK,0,1,nil) - --● Look at 3 random face-down cards in your opponent's Extra Deck, and if you do, banish 1 of them - local b3=Duel.IsExistingMatchingCard(aux.AND(Card.IsFacedown,Card.IsAbleToRemove),tp,0,LOCATION_EXTRA,3,nil) - if chk==0 then return b1 or b2 or b3 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}, - {b3,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - elseif op==2 then - e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) - elseif op==3 then - e:SetCategory(CATEGORY_REMOVE) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Special Summon 1 "Aiwass the Spirit of the Law" from your Deck or GY - if 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_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 - elseif op==2 then - --● Send to the GY, or banish, 1 "Aleister" monster from your Deck - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,4)) - local sc=Duel.SelectMatchingCard(tp,s.tgbanfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc then - op=Duel.SelectEffect(tp, - {sc:IsAbleToGrave(),aux.Stringid(id,5)}, - {sc:IsAbleToRemove(),aux.Stringid(id,6)}) - if op==1 then - Duel.SendtoGrave(sc,REASON_EFFECT) - elseif op==2 then - Duel.Remove(sc,POS_FACEUP,REASON_EFFECT) - end - end - elseif op==3 then - --● Look at 3 random face-down cards in your opponent's Extra Deck, and if you do, banish 1 of them - local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA):RandomSelect(tp,3) - if #g>0 then - Duel.ConfirmCards(tp,g) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil) - if #rg>0 then - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) - end - Duel.ShuffleExtra(1-tp) - end - end - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,7)) - --You cannot declare attacks for the rest of this turn, except with Fusion 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:IsFusionMonster() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101305055.lua b/pre-release/c101305055.lua deleted file mode 100644 index ab62b39452..0000000000 --- a/pre-release/c101305055.lua +++ /dev/null @@ -1,67 +0,0 @@ ---絶境なる獄神域-ヴィライア ---Dead-End Power Patron Realm - Viraia ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Show 1 "Nerva the Power Patron of Creation", 1 "Jupiter the Power Patron of Destruction", and 1 "Junora the Power Patron of Tuning" from your Extra Deck, face-up field, and/or GY, and if you do, your opponent cannot activate cards or effects in response the activation of your "Power Patron" monsters' effects this turn - 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,0}) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE) - c:RegisterEffect(e1) - --If you would banish the top card(s) of your Deck to activate the effect of a "Power Patron" monster you control, you can banish this card from your GY instead - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_COST_REPLACE) - e2:SetRange(LOCATION_GRAVE) - e2:SetTargetRange(1,0) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsAbleToRemoveAsCost() end) - e2:SetValue(s.repval) - e2:SetOperation(function(base) Duel.Remove(base:GetHandler(),POS_FACEUP,REASON_COST) end) - c:RegisterEffect(e2) -end -s.listed_names={53589300,68231287,5914858} --"Nerva the Power Patron of Creation", "Jupiter the Power Patron of Destruction", "Junora the Power Patron of Tuning" -s.listed_series={SET_POWER_PATRON} -function s.showfilter(c) - return c:IsCode(53589300,68231287,5914858) and (c:IsFaceup() or not c:IsOnField()) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(s.showfilter,tp,LOCATION_EXTRA|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) - return g:GetClassCount(Card.GetCode)>=3 - end -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.showfilter,tp,LOCATION_EXTRA|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) - if #g>=3 then - local rg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_CONFIRM) - local fieldgraveg,extrag=rg:Split(Card.IsLocation,nil,LOCATION_ONFIELD|LOCATION_GRAVE) - if #fieldgraveg>0 then Duel.HintSelection(fieldgraveg) end - if #extrag>0 then Duel.ConfirmCards(1-tp,extrag) end - if rg:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) then Duel.ShuffleExtra(tp) end - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1)) - --Your opponent cannot activate cards or effects in response the activation of your "Power Patron" monsters' effects this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAINING) - e1:SetOperation(s.inactop) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function s.inactop(e,tp,eg,ep,ev,re,r,rp) - if ep==tp and Chain.IsType(ev,TYPE_MONSTER) and Chain.IsSetcode(ev,SET_POWER_PATRON) then - Duel.SetChainLimit(function(e,rp,tp) return rp==tp end) - end -end -function s.repval(base,extracon,e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - return c:IsSetCard(SET_POWER_PATRON) and c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) -end \ No newline at end of file diff --git a/pre-release/c101305056.lua b/pre-release/c101305056.lua deleted file mode 100644 index 7a1dc87a96..0000000000 --- a/pre-release/c101305056.lua +++ /dev/null @@ -1,75 +0,0 @@ ---予幻なき日々のまぼろし ---Pasto-Ral Theorealize ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If you control an "Artmage", "DoomZ", or "Elfnote" card: Special Summon 1 "Medius the Pure" from your hand or Deck, also your opponent cannot activate cards or effects when that monster is Special Summoned - 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) - e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,{SET_ARTMAGE,SET_DOOMZ,SET_ELFNOTE}),tp,LOCATION_ONFIELD,0,1,nil) end) - e1:SetTarget(s.mediussptg) - e1:SetOperation(s.mediusspop) - c:RegisterEffect(e1) - --You can banish this card from your GY, then target 1 Fusion, Synchro, or Xyz Monster in your GY; Special Summon it to your zone a Link Monster points to - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.gysptg) - e2:SetOperation(s.gyspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ARTMAGE,SET_DOOMZ,SET_ELFNOTE} -s.listed_names={CARD_MEDIUS_THE_PURE} -function s.mediusspfilter(c,e,tp) - return c:IsCode(CARD_MEDIUS_THE_PURE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.mediussptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.mediusspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) -end -function s.mediusspop(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.mediusspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - --Also your opponent cannot activate cards or effects when that monster is Special Summoned - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_END) - e1:SetOperation(function(e) - Duel.SetChainLimitTillChainEnd(function(e,rp,tp) return tp==rp end) - e:Reset() - end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function s.gyspfilter(c,e,tp,zones) - return c:IsType(TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zones) -end -function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local zones=aux.GetMMZonesPointedTo(tp) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.gyspfilter(chkc,e,tp,zones) end - if chk==0 then return zones>0 and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zones) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zones) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.gyspop(e,tp,eg,ep,ev,re,r,rp) - local zones=aux.GetMMZonesPointedTo(tp) - if zones==0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zones) - end -end \ No newline at end of file diff --git a/pre-release/c101305057.lua b/pre-release/c101305057.lua deleted file mode 100644 index b191c23e26..0000000000 --- a/pre-release/c101305057.lua +++ /dev/null @@ -1,66 +0,0 @@ ---RUM-幻影騎士団レクイエム ---The Phantom Knights' Rank-Up-Magic Requiem ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Target 1 "The Phantom Knights" or "Xyz Dragon" monster in your GY or banishment; Special Summon it (but negate its effects), then Special Summon from your Extra Deck, 1 "The Phantom Knights" or "Xyz Dragon" Xyz Monster that is 1 Rank higher than a DARK Xyz Monster you control, by using that monster as material (this is treated as an Xyz Summon, transfer its materials) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) - 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) - c:RegisterEffect(e1) -end -s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON} -function s.fieldxyzfilter(c,e,tp) - local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - if not (#pg==0 or (#pg==1 and pg:IsContains(c))) then return false end - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsXyzMonster() and c:IsFaceup() - and Duel.IsExistingMatchingCard(s.xyzspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1) -end -function s.xyzspfilter(c,e,tp,mc,rank) - if c.rum_limit and not c.rum_limit(mc,e) then return false end - return c:IsSetCard({SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON}) and c:IsXyzMonster() and c:IsRank(rank) and mc:IsCanBeXyzMaterial(c,tp) - and mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) -end -function s.gybanspfilter(c,e,tp,field_xyz_chk) - return c:IsSetCard({SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON}) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and (field_xyz_chk or s.fieldxyzfilter(c,e,tp)) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local field_xyz_chk=Duel.IsExistingMatchingCard(s.fieldxyzfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.gybanspfilter(chkc,e,tp,field_xyz_chk) end - if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.gybanspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp,field_xyz_chk) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.gybanspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp,field_xyz_chk) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,LOCATION_EXTRA) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - tc:NegateEffects(e:GetHandler()) - if Duel.SpecialSummonComplete()==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local mc=Duel.SelectMatchingCard(tp,s.fieldxyzfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() - if not mc then return end - Duel.HintSelection(mc) - if mc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local xyz=Duel.SelectMatchingCard(tp,s.xyzspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mc,mc:GetRank()+1):GetFirst() - if xyz then - xyz:SetMaterial(mc) - Duel.Overlay(xyz,mc) - Duel.BreakEffect() - if Duel.SpecialSummon(xyz,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then - xyz:CompleteProcedure() - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101305058.lua b/pre-release/c101305058.lua deleted file mode 100644 index 4f09c21429..0000000000 --- a/pre-release/c101305058.lua +++ /dev/null @@ -1,87 +0,0 @@ ---S-Force オリジン ---S-Force Origin ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "S-Force" monster from your hand, GY, or banishment, 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_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If another card(s) is banished while this card is in your GY: You can banish it; take 2 "S-Force" cards from your Deck, except "S-Force Origin", banish 1 of them, and send the other to the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_REMOVE) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.bantgtg) - e2:SetOperation(s.bantgop) - c:RegisterEffect(e2) -end -s.listed_series={SET_S_FORCE} -s.listed_names={id} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_S_FORCE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and (c:IsLocation(LOCATION_HAND) 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_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) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE) -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|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then - --Banish it when 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) - sc:RegisterEffect(e1,true) - end -end -function s.bantgfilter(c) - return c:IsSetCard(SET_S_FORCE) and (c:IsAbleToRemove() or c:IsAbleToGrave()) and not c:IsCode(id) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsAbleToRemove,1,nil) and sg:IsExists(Card.IsAbleToGrave,1,nil) -end -function s.bantgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(s.bantgfilter,tp,LOCATION_DECK,0,nil) - return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) - end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end -function s.banfilter(c,sg) - return c:IsAbleToRemove() and sg:IsExists(Card.IsAbleToGrave,1,c) -end -function s.bantgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.bantgfilter,tp,LOCATION_DECK,0,nil) - if #g<2 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,aux.Stringid(id,2)) - if #sg~=2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local bg=sg:FilterSelect(tp,s.banfilter,1,1,nil,sg) - if #bg>0 then - Duel.Remove(bg,POS_FACEUP,REASON_EFFECT) - Duel.SendtoGrave(sg-bg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305059.lua b/pre-release/c101305059.lua deleted file mode 100644 index 28ed8158bd..0000000000 --- a/pre-release/c101305059.lua +++ /dev/null @@ -1,107 +0,0 @@ ---メルフィーがころんだ ---Melffy Statues Game ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add up to 4 "Melffy" monsters with different names from your Deck to your hand, then it becomes the End Phase of this turn - 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:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --You cannot Special Summon the turn you activate this card, except "Melffy" monsters - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsSetCard(SET_MELFFY) and c:IsFaceup() end) - --You can banish this card from your GY, then target 2 "Melffy" cards in your GY, except "Melffy Statues Game"; add 1 of them to your hand, and if you do, place the other on the bottom of the Deck. You can only use this effect of "Melffy Statues Game" once per turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.thdtg) - e2:SetOperation(s.thdop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MELFFY} -s.listed_names={id} -function s.cost(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 card, except "Melffy" 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 not c:IsSetCard(SET_MELFFY) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thfilter(c) - return c:IsSetCard(SET_MELFFY) and c:IsMonster() 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) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if #g==0 then return end - local thg=aux.SelectUnselectGroup(g,e,tp,1,4,aux.dncheck,1,tp,HINTMSG_ATOHAND) - if #thg>0 and Duel.SendtoHand(thg,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,thg) - local turn_player=Duel.GetTurnPlayer() - Duel.BreakEffect() - if Duel.IsMainPhase1() then - Duel.SkipPhase(turn_player,PHASE_MAIN1,RESET_PHASE|PHASE_END,1) - --Prevent the player from entering the Battle Phase - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_BP) - e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,turn_player) - elseif Duel.IsMainPhase2() then - Duel.SkipPhase(turn_player,PHASE_MAIN2,RESET_PHASE|PHASE_END,1) - end - end -end -function s.thdfilter(c) - return c:IsSetCard(SET_MELFFY) and (c:IsAbleToHand() or c:IsAbleToDeck()) and not c:IsCode(id) -end -function s.rescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsAbleToHand,nil)>=1 and sg:FilterCount(Card.IsAbleToDeck,nil)>=1 -end -function s.thdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetTargetGroup(s.thdfilter,tp,LOCATION_GRAVE,0,nil) - if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end - local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,aux.Stringid(id,3)) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,1,tp,0) -end -function s.gythfilter(c,tg) - return c:IsAbleToHand() and tg:IsExists(Card.IsAbleToDeck,1,c) -end -function s.thdop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==2 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local hg=tg:FilterSelect(tp,s.gythfilter,1,1,nil,tg) - if #hg==0 then return end - Duel.HintSelection(hg) - if Duel.SendtoHand(hg,nil,REASON_EFFECT)==0 then return end - local dg=tg-hg - if #dg==0 then return end - Duel.HintSelection(dg) - Duel.SendtoDeck(dg,nil,SEQ_DECKBOTTOM,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305060.lua b/pre-release/c101305060.lua deleted file mode 100644 index 9a096282d1..0000000000 --- a/pre-release/c101305060.lua +++ /dev/null @@ -1,89 +0,0 @@ ---霊力回復薬 ---Spiritual Power Recovery Potion ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Banish any number of Spellcaster monsters and/or Spells from your GY; all monsters you currently control gain 200 ATK for each card banished this way, and if they do, you gain 400 LP for each card banished this way - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetCost(s.atkcost) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_END_PHASE) - c:RegisterEffect(e1) - --During your Main Phase: You can banish this card from your GY; Special Summon any number of Spellcaster monsters with different Attributes 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_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_POSSESSED} -function s.atkcostfilter(c) - return (c:IsRace(RACE_SPELLCASTER) or c:IsSpell()) and c:IsAbleToRemoveAsCost() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.atkcostfilter,tp,LOCATION_GRAVE,0,1,nil) end - local max_count=Duel.GetMatchingGroupCount(s.atkcostfilter,tp,LOCATION_GRAVE,0,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.atkcostfilter,tp,LOCATION_GRAVE,0,1,max_count,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:SetLabel(#g) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end - local banish_count=e:GetLabel() - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,200*banish_count) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,400*banish_count) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - if #g==0 then return end - local prev_atk=0 - local c=e:GetHandler() - local banish_count=e:GetLabel() - local atk=200*banish_count - local atk_change_chk=false - for atkc in g:Iter() do - prev_atk=atkc:GetAttack() - --All monsters you currently control gain 200 ATK for each card banished this way - atkc:UpdateAttack(atk,RESET_EVENT|RESETS_STANDARD,c) - if not atk_change_chk and atkc:GetAttack()>prev_atk then - atk_change_chk=true - end - end - if not atk_change_chk then return end - Duel.Recover(tp,400*banish_count,REASON_EFFECT) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_SPELLCASTER) 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) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if #g==0 then return end - local max_attribute_count=g:GetClassCount(Card.GetAttribute) - ft=math.min(ft,max_attribute_count) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local sg=aux.SelectUnselectGroup(g,e,tp,1,max_attribute_count,aux.dpcheck(Card.GetAttribute),1,tp,HINTMSG_SPSUMMON) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101305061.lua b/pre-release/c101305061.lua deleted file mode 100644 index 941f72b1fa..0000000000 --- a/pre-release/c101305061.lua +++ /dev/null @@ -1,51 +0,0 @@ ---怠慢な壺 ---Pot of Procrastination ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Draw cards equal to the number of cards your opponent controls, then if you drew 2 or more, place the same number -1 from your hand on the bottom of the Deck in any order. For the rest of this turn after this card resolves, you cannot activate "Pot of Procrastination" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_names={id} -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local draw_count=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) - if chk==0 then return draw_count>0 and Duel.IsPlayerCanDraw(tp,draw_count) end - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,draw_count) - if draw_count>=2 then - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,draw_count-1,tp,LOCATION_HAND) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local draw_count=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) - if draw_count>0 and Duel.Draw(tp,draw_count,REASON_EFFECT)>0 and draw_count>=2 then - Duel.ShuffleHand(tp) - local return_count=draw_count-1 - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,return_count,return_count,nil) - if #g>0 then - Duel.BreakEffect() - if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and return_count>=2 then - Duel.SortDeckbottom(tp,tp,return_count) - end - end - end - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - --For the rest of this turn after this card resolves, you cannot activate "Pot of Procrastination" - local e1=Effect.CreateEffect(e:GetHandler()) - 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(function(e,re) return re:GetHandler():IsCode(id) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101305062.lua b/pre-release/c101305062.lua deleted file mode 100644 index 45d5d58932..0000000000 --- a/pre-release/c101305062.lua +++ /dev/null @@ -1,75 +0,0 @@ ---朽ちた祭儀要録 ---Corrupted Ritual Records ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Reveal 1 Ritual Spell in your hand or Deck, and add 1 monster that mentions it 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_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --If a face-up Ritual Monster(s) you control leaves the field by card effect while this card is in your GY, and you control no face-up non-Ritual Monsters: You can add this card to your 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_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.selfthcon) - e2:SetTarget(s.selfthtg) - e2:SetOperation(s.selfthop) - c:RegisterEffect(e2) -end -function s.revealfilter(c,tp) - return c:IsRitualSpell() and not c:IsPublic() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) -end -function s.thfilter(c,code) - return c:IsMonster() and c:ListsCode(code) and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.rescon(sg,e,tp,mg) - local ritual_spell=sg:Filter(Card.IsRitualSpell,nil):GetFirst() - return ritual_spell and sg:IsExists(s.thfilter,1,nil,ritual_spell:GetCode()),not ritual_spell -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.revealfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,tp) - if #g==0 then return end - g:Merge(Duel.GetMatchingGroup(aux.AND(Card.IsMonster,Card.IsAbleToHand),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 - local opp=1-tp - local ritual_spell,monster=sg:Split(Card.IsRitualSpell,nil) - Duel.ConfirmCards(opp,ritual_spell) - Duel.SendtoHand(monster,nil,REASON_EFFECT) - Duel.ConfirmCards(opp,monster) - end -end -function s.selfthconfilter(c,tp) - return c:IsRitualMonster() and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsReason(REASON_EFFECT) -end -function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.selfthconfilter,1,nil,tp) -end -function s.selfthtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHand() - and not Duel.IsExistingMatchingCard(aux.FaceupFilter(aux.NOT(Card.IsRitualMonster)),tp,LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) -end -function s.selfthop(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/c101305063.lua b/pre-release/c101305063.lua deleted file mode 100644 index 46fcb7ede2..0000000000 --- a/pre-release/c101305063.lua +++ /dev/null @@ -1,92 +0,0 @@ ---超電導閃輝プラズマ・ブラスト ---Plasma Blast ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Activate this effect depending on whose turn it is; - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --Keep track of a monster being destroyed by battle or card effect - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_DESTROYED) - ge1:SetOperation(s.descheckop) - Duel.RegisterEffect(ge1,0) - end) -end -function s.descheckfilter(c) - return (c:IsPreviousLocation(LOCATION_MZONE) or (not c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsMonsterCard())) - and c:IsReason(REASON_BATTLE|REASON_EFFECT) -end -function s.descheckop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(s.descheckfilter,1,nil) then - Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) - end -end -function s.thfilter(c) - return c:IsRace(RACE_THUNDER|RACE_ROCK) and c:IsAbleToHand() and (c:IsFaceup() or c:IsLocation(LOCATION_DECK)) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local op=Duel.IsTurnPlayer(tp) and 1 or 2 - local locations=LOCATION_MZONE|LOCATION_GRAVE|LOCATION_REMOVED - if Duel.HasFlagEffect(0,id) then locations=locations|LOCATION_DECK end - if chk==0 then - if op==1 then - return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 - and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_DECK,0,1,nil,RACE_THUNDER|RACE_ROCK) - elseif op==2 then - return Duel.IsExistingMatchingCard(s.thfilter,tp,locations,0,1,nil) - end - end - e:SetLabel(op) - Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,op)) - if op==1 then - e:SetCategory(CATEGORY_DESTROY) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) - elseif op==2 then - e:SetCategory(CATEGORY_TOHAND|CATEGORY_SEARCH) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,locations) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Yours: Place 1 Thunder or Rock monster from your Deck on top of your Deck, then if a Thunder or Rock monster is in your field or GY, you can destroy 1 card on the field - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) - local sc=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_DECK,0,1,1,nil,RACE_THUNDER|RACE_ROCK):GetFirst() - if not sc then return end - Duel.ShuffleDeck(tp) - Duel.MoveSequence(sc,0) - Duel.ConfirmDecktop(tp,1) - local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)-e:GetHandler() - if #g>0 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_THUNDER|RACE_ROCK),tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=g:Select(tp,1,1,nil) - if #dg>0 then - Duel.HintSelection(dg) - Duel.BreakEffect() - Duel.Destroy(dg,REASON_EFFECT) - end - end - elseif op==2 then - --● Opponent's: Add 1 Thunder or Rock monster from your field, GY, or banishment to the hand, or if a monster(s) was destroyed by battle or card effect this turn, you can add from your Deck instead - local locations=LOCATION_MZONE|LOCATION_GRAVE|LOCATION_REMOVED - if Duel.HasFlagEffect(0,id) then locations=locations|LOCATION_DECK end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local hc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,locations,0,1,1,nil):GetFirst() - if hc then - if not hc:IsLocation(LOCATION_DECK) then Duel.HintSelection(hc) end - Duel.SendtoHand(hc,nil,REASON_EFFECT) - if hc:IsPreviousLocation(LOCATION_DECK) then Duel.ConfirmCards(1-tp,hc) end - end - end -end \ No newline at end of file diff --git a/pre-release/c101305064.lua b/pre-release/c101305064.lua deleted file mode 100644 index d972072128..0000000000 --- a/pre-release/c101305064.lua +++ /dev/null @@ -1,112 +0,0 @@ ---夏 ---Summer -local s,id=GetID() -local COUNTER_SEASON=0x214 -local CARD_SPRING=60600821 -function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_SEASON) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Once per turn: You can place Season Counters on this card equal to the number of your opponent's unused Main Monster Zones - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_COUNTER) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_FZONE) - e1:SetCountLimit(1) - e1:SetTarget(s.countertg) - e1:SetOperation(s.counterop) - c:RegisterEffect(e1) - --Once per turn, when your monster declares an attack: You can inflict 400 damage to your opponent for each Season Counter on this card, and for each "Spring" in your GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(tp) end) - e2:SetTarget(s.damtg) - e2:SetOperation(s.damop) - c:RegisterEffect(e2) - --Once per turn, during your opponent's End Phase: You can take 1 Field Spell from your hand or Deck that you can place a Season Counter on, and place it face-up on your field (but neither player can activate its effects this turn), and if you do, place all Season Counters on this card on that card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_COUNTER) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1) - e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e3:SetTarget(s.pltg) - e3:SetOperation(s.plop) - c:RegisterEffect(e3) -end -s.counter_place_list={COUNTER_SEASON} -s.listed_names={CARD_SPRING} -function s.countertg(e,tp,eg,ep,ev,re,r,rp,chk) - local zones_count=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - if chk==0 then return zones_count>0 end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,zones_count,tp,COUNTER_SEASON) -end -function s.counterop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local zones_count=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - if c:IsRelateToEffect(e) and zones_count>0 then - c:AddCounter(COUNTER_SEASON,zones_count) - end -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - local season_counter_count=e:GetHandler():GetCounter(COUNTER_SEASON) - local spring_count=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,CARD_SPRING) - local total_damage=400*(season_counter_count+spring_count) - if chk==0 then return total_damage>0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,total_damage) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local player=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local season_counter_count=c:IsRelateToEffect(e) and c:GetCounter(COUNTER_SEASON) or 0 - local spring_count=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,CARD_SPRING) - local total_damage=400*(season_counter_count+spring_count) - if total_damage>0 then - Duel.Damage(player,total_damage,REASON_EFFECT) - end -end -function s.plfilter(c) - return c:IsFieldSpell() and c:IsCanAddCounter(COUNTER_SEASON,1,false,LOCATION_ONFIELD) and not c:IsForbidden() -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler():GetCounter(COUNTER_SEASON),tp,COUNTER_SEASON) -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil):GetFirst() - if not sc then return end - local c=e:GetHandler() - local ct=c:GetCounter(COUNTER_SEASON) - local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) - if fc then - Duel.SendtoGrave(fc,REASON_RULE) - Duel.BreakEffect() - end - if Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) then - --Neither player can activate its effects this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3302) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESETS_STANDARD_PHASE_END) - sc:RegisterEffect(e1) - if ct>0 then - sc:AddCounter(COUNTER_SEASON,ct) - end - end -end \ No newline at end of file diff --git a/pre-release/c101305065.lua b/pre-release/c101305065.lua deleted file mode 100644 index 27a67882b4..0000000000 --- a/pre-release/c101305065.lua +++ /dev/null @@ -1,92 +0,0 @@ ---二つの心 ---Mind Shuffle ---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 either player's turn: You can add 1 monster that mentions "Ritual of Light and Darkness" 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_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.AND(s.opccost1,Cost.HintSelectedEffect)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --When your opponent activates a card or effect: You can return 1 Level 7 or higher monster you control to the hand; Special Summon 1 monster with a different name from your hand that mentions "Ritual of Light and Darkness", ignoring its Summoning conditions - 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_SZONE) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(Cost.AND(s.spcost,s.opccost2,Cost.HintSelectedEffect)) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_RITUAL_OF_LIGHT_AND_DARKNESS} -function s.opccost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end - Duel.RegisterFlagEffect(tp,id+100,RESET_CHAIN,0,1) -end -function s.opccost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id+100) end - Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1) -end -function s.thfilter(c) - return c:IsMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) 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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) - end -end -function s.spcostfilter(c,e,tp) - return c:IsLevelAbove(7) and c:IsFaceup() and c:IsAbleToHandAsCost() and Duel.GetMZoneCount(tp,c)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetCode()) -end -function s.spfilter(c,e,tp,code) - return c:IsMonster() and c:ListsCode(CARD_RITUAL_OF_LIGHT_AND_DARKNESS) and not c:IsCode(code) - and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -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,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local sc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() - Duel.HintSelection(sc) - Duel.SendtoHand(sc,nil,REASON_COST) - e:SetLabel(sc:GetCode()) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetParam(e:GetLabel()) - 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 - local code=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,code) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) - end -end diff --git a/pre-release/c101305066.lua b/pre-release/c101305066.lua deleted file mode 100644 index fcd27423ce..0000000000 --- a/pre-release/c101305066.lua +++ /dev/null @@ -1,69 +0,0 @@ ---三幻魔合殺 ---Destruction Chant of the Sacred Beast ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "Sacred Beast" monster from your hand or GY in Defense Position, then if you control 2 or more "Sacred Beast" monsters whose original Levels are 10, you can negate the effects of 1 face-up card your opponent controls, and if you do, destroy it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_DESTROY) - 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) - --You can banish this card from your GY; Fusion Summon 1 "Phantasm" Fusion Monster from your Extra Deck, using monsters from your hand or field - local fusion_params={fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_PHANTASM)} - 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_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_SACRED_BEAST,SET_PHANTASM} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP_DEFENSE) -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) - local dg=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) - Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,dg,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,0) -end -function s.sacredbeastfilter(c) - return c:IsSetCard(SET_SACRED_BEAST) and c:IsOriginalLevel(10) and c:IsFaceup() -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 and Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP_DEFENSE)>0 - and Duel.IsExistingMatchingCard(s.sacredbeastfilter,tp,LOCATION_MZONE,0,2,nil) - and Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local sc=Duel.SelectMatchingCard(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - if sc:IsCanBeDisabledByEffect(e) then - Duel.BreakEffect() - --Negate the effects of 1 face-up card your opponent controls, and if you do, destroy it - sc:NegateEffects(e:GetHandler(),RESET_EVENT|RESETS_STANDARD,true) - Duel.AdjustInstantly(sc) - if sc:IsDisabled() then - Duel.Destroy(sc,REASON_EFFECT) - end - end - end -end diff --git a/pre-release/c101305067.lua b/pre-release/c101305067.lua deleted file mode 100644 index 21768ed66a..0000000000 --- a/pre-release/c101305067.lua +++ /dev/null @@ -1,101 +0,0 @@ ---三幻魔の神淵 ---Divine Abyss of the Sacred Beast ---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 send 3 face-up "Divine Abyss of the Sacred Beast" you control to the GY, including this card, then target 1 face-up monster your opponent controls; change it to face-down Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_SZONE) - e1:SetCost(s.poscost) - e1:SetTarget(s.postg) - e1:SetOperation(s.posop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --During the Main Phase: You can place 2 "Divine Abyss of the Sacred Beast" from your hand, Deck, and/or GY face-up on your field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetTarget(s.pltg) - e2:SetOperation(s.plop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) - --During your opponent's End Phase, if this card is in your GY: You can place it on the bottom of the Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_TODECK) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp) return Duel.IsEndPhase(1-tp) end) - e3:SetTarget(s.tdtg) - e3:SetOperation(s.tdop) - e3:SetHintTiming(0,TIMING_END_PHASE) - c:RegisterEffect(e3) -end -s.listed_names={id} -function s.poscostfilter(c) - return c:IsCode(id) and c:IsAbleToGraveAsCost() and c:IsFaceup() -end -function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsStatus(STATUS_EFFECT_ENABLED) - and Duel.IsExistingMatchingCard(s.poscostfilter,tp,LOCATION_ONFIELD,0,2,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.poscostfilter,tp,LOCATION_ONFIELD,0,2,2,c) - Duel.SendtoGrave(g+c,REASON_COST) -end -function s.postg(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:IsCanTurnSet() end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,POS_FACEDOWN_DEFENSE) -end -function s.posop(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.selfplfilter(c,tp) - return c:IsCode(id) and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=2 - and Duel.IsExistingMatchingCard(s.selfplfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,nil,tp) end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)<2 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.selfplfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,2,nil,tp) - if #g==2 then - Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - Duel.MoveToField(g:GetNext(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305068.lua b/pre-release/c101305068.lua deleted file mode 100644 index 228105f71b..0000000000 --- a/pre-release/c101305068.lua +++ /dev/null @@ -1,90 +0,0 @@ ---雷盟-リターンストローク ---Blitzclique - Return Stroke ---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) - --"Blitzclique" monsters you control cannot be destroyed by your opponent's card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_BLITZCLIQUE) end) - e1:SetValue(aux.indoval) - c:RegisterEffect(e1) - --When your opponent activates a Spell Card or effect: You can return 1 "Blitzclique" monster you control to the hand; negate that effect, and if you do, destroy that card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(s.discon) - e2:SetCost(s.discost) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --You can banish this card from your GY, then target 1 "Blitzclique" monster in your field or GY; return it to the hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND) - 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:SetCost(Cost.SelfBanish) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -s.listed_series={SET_BLITZCLIQUE} -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsSpellEffect() and Duel.IsChainDisablable(ev) -end -function s.discostfilter(c) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsFaceup() and c:IsAbleToHandAsCost() -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.discostfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,s.discostfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_COST) -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.thfilter(c) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsMonster() 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_MZONE|LOCATION_GRAVE) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305069.lua b/pre-release/c101305069.lua deleted file mode 100644 index d923307b42..0000000000 --- a/pre-release/c101305069.lua +++ /dev/null @@ -1,97 +0,0 @@ ---雷盟-オルタネータ ---Blitzclique - Alternator ---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) - --Monsters your opponent controls lose 300 ATK/DEF for each Thunder monster you control - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_FIELD) - e1a:SetCode(EFFECT_UPDATE_ATTACK) - e1a:SetRange(LOCATION_SZONE) - e1a:SetTargetRange(0,LOCATION_MZONE) - e1a:SetValue(function(e,c) return -300*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_THUNDER),e:GetHandlerPlayer(),LOCATION_MZONE,0,nil) end) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e1b) - --You can shuffle 1 other "Blitzclique" card from your hand or face-up field into the Deck; add 1 Thunder monster with a different name from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(s.thunderthcost) - e2:SetTarget(s.thunderthtg) - e2:SetOperation(s.thunderthop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) - --You can banish this card from your GY; add 1 "Blitzclique" Spell or "Kowloon, Citadel of the Sky" 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_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCost(Cost.SelfBanish) - e3:SetTarget(s.blitzthtg) - e3:SetOperation(s.blitzthop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -s.listed_names={101305050} --"Kowloon, Citadel of the Sky" -s.listed_series={SET_BLITZCLIQUE} -function s.thunderthcostfilter(c,tp) - return c:IsSetCard(SET_BLITZCLIQUE) and c:IsAbleToDeckAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) - and Duel.IsExistingMatchingCard(s.thunderthfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) -end -function s.thunderthfilter(c,code) - return c:IsRace(RACE_THUNDER) and not c:IsCode(code) and c:IsAbleToHand() -end -function s.thunderthcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.thunderthcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,c,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local sc=Duel.SelectMatchingCard(tp,s.thunderthcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c,tp):GetFirst() - if sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - else - Duel.HintSelection(sc) - end - Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_COST) - e:SetLabel(sc:GetCode()) -end -function s.thunderthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thunderthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thunderthfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel()) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.blitzthfilter(c) - return ((c:IsSetCard(SET_BLITZCLIQUE) and c:IsSpell()) or c:IsCode(101305050)) and c:IsAbleToHand() -end -function s.blitzthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.blitzthfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.blitzthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.blitzthfilter,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/c101305070.lua b/pre-release/c101305070.lua deleted file mode 100644 index 0214df292c..0000000000 --- a/pre-release/c101305070.lua +++ /dev/null @@ -1,88 +0,0 @@ ---魔法名-「新しき世界の始まり」 ---Magical Name - "Rosa Mundi" ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Banish 1 "Aleister" monster or 1 Fusion Monster from your GY; Special Summon 1 "Invoked" monster from your Extra Deck, ignoring its Summoning conditions, but banish it during the End Phase - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.extraspcost) - e1:SetTarget(s.extrasptg) - e1:SetOperation(s.extraspop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --If a monster(s) is banished face-up, while this card is in your GY: You can banish this card, then target 1 of your banished "Invoked" monsters; Special Summon it - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET,EFFECT,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e2:SetCode(EVENT_REMOVE) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.banspcon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.bansptg) - e2:SetOperation(s.banspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ALEISTER,SET_INVOKED} -function s.extraspcostfilter(c,e,tp) - return (c:IsSetCard(SET_ALEISTER) or c:IsFusionMonster()) and c:IsAbleToRemoveAsCost() and c:IsMonster() and aux.SpElimFilter(c,true) - and Duel.IsExistingMatchingCard(s.extraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) -end -function s.extraspfilter(c,e,tp,rc) - return c:IsSetCard(SET_INVOKED) and Duel.GetLocationCountFromEx(tp,tp,rc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.extraspcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-100) - if chk==0 then return Duel.IsExistingMatchingCard(s.extraspcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.extraspcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.Remove(g,nil,REASON_COST) -end -function s.extrasptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local cost_chk=e:GetLabel()==-100 - e:SetLabel(0) - return cost_chk or Duel.IsExistingMatchingCard(s.extraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE) -end -function s.extraspop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.extraspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummon(sc,0,tp,tp,true,false,POS_FACEUP)>0 then - --Banish it during the End Phase - aux.DelayedOperation(sc,PHASE_END,id,e,tp,function(ag) Duel.Remove(ag,POS_FACEUP,REASON_EFFECT) end,nil,0,0,aux.Stringid(id,2)) - end -end -function s.banspconfilter(c) - return c:IsMonster() and c:IsFaceup() and c:IsLocation(LOCATION_REMOVED) - and not c:IsPreviousLocation(LOCATION_SZONE) -end -function s.banspcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.banspconfilter,1,nil) -end -function s.banspfilter(c,e,tp) - return c:IsSetCard(SET_INVOKED) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.bansptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.banspfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.banspfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.banspfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.banspop(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/c101305071.lua b/pre-release/c101305071.lua deleted file mode 100644 index 3cfa09a8d2..0000000000 --- a/pre-release/c101305071.lua +++ /dev/null @@ -1,71 +0,0 @@ ---終刻なる獄神影 ---Power Patron Shadows of the End Times ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "Power Patron" monster from your hand, face-up Extra Deck, or GY, then you can apply any of these effects, in sequence, based on the number of different card types (Fusion, Synchro, Xyz) you control - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -s.listed_series={SET_POWER_PATRON} -function s.spfilter(c,e,tp) - if not (c:IsSetCard(SET_POWER_PATRON) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - if c:IsLocation(LOCATION_HAND|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_HAND|LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_EXTRA|LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_DECK|LOCATION_ONFIELD|LOCATION_HAND) -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_HAND|LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - local card_type_count=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsMonster),tp,LOCATION_MZONE,0,nil):GetBinClassCount(function(c) return c:GetType()&(TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ) end) - if card_type_count==0 then return end - local opp=1-tp - local break_chk=false - local opp_decktop3=Duel.GetDecktopGroup(opp,3) - local opp_field=Duel.GetFieldGroup(opp,LOCATION_ONFIELD,0) - local opp_hand=Duel.GetFieldGroup(opp,LOCATION_HAND,0) - --● 1+: Banish (face-down) the top 3 cards of your opponent's Deck - if card_type_count>=1 and #opp_decktop3==3 and opp_decktop3:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)==3 - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.DisableShuffleCheck() - Duel.BreakEffect() - if Duel.Remove(opp_decktop3,POS_FACEDOWN,REASON_EFFECT)>0 then break_chk=true end - end - --● 2+: Banish (face-down) 1 card your opponent controls - if card_type_count>=2 and #opp_field>0 and opp_field:IsExists(Card.IsAbleToRemove,1,nil,tp,POS_FACEDOWN) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=opp_field:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil,tp,POS_FACEDOWN) - if #g>0 then - Duel.HintSelection(g) - if break_chk then Duel.BreakEffect() end - if Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)>0 then break_chk=true end - end - end - --● 3: Banish (face-down) 1 random card from your opponent's hand - if card_type_count==3 and #opp_hand>0 and opp_hand:IsExists(Card.IsAbleToRemove,1,nil,tp,POS_FACEDOWN) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - local g=opp_hand:Match(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN):RandomSelect(tp,1) - if #g>0 then - if break_chk then Duel.BreakEffect() end - Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101305072.lua b/pre-release/c101305072.lua deleted file mode 100644 index 0815a0e642..0000000000 --- a/pre-release/c101305072.lua +++ /dev/null @@ -1,91 +0,0 @@ ---エルフェンノーツ~継唱のクウォートレイン~ ---Elfnotes: Quatrain of Succession ---scripted by pyrQ -local s,id=GetID() -local TOKEN_ELFNOTE_SERAPHIM=id+100 -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --The monster in your center Main Monster Zone cannot be banished by your opponent's card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_REMOVE) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(0,1) - e1:SetTarget(s.rmlimit) - c:RegisterEffect(e1) - --You can send 1 other Spell/Trap from your hand or field to the GY and declare a Level from 1 to 4; Special Summon 1 "Elfnote Seraphim Token" (Plant/Tuner/FIRE/ATK 0/DEF 0) with the declared Level, but while that Token is in the Monster Zone, the player who Summoned it cannot Special Summon from the Extra Deck, except "Elfnote" monsters. You can only use this effect of "Elfnotes: Quatrain of Succession" once per turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,id) - e2:SetCost(s.tokencost) - e2:SetTarget(s.tokentg) - e2:SetOperation(s.tokenop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_names={TOKEN_ELFNOTE_SERAPHIM} -s.listed_series={SET_ELFNOTE} -function s.rmlimit(e,c,tp,r) - return c:IsSequence(2) and c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) and not c:IsImmuneToEffect(e) and r&REASON_EFFECT>0 -end -function s.tokencostfilter(c,tp) - return c:IsSpellTrap() and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 -end -function s.tokencost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.tokencostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,c,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tokencostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c,tp) - Duel.SendtoGrave(g,REASON_COST) -end -function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) - local exceptions={} - for lv=1,4 do - if not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ELFNOTE_SERAPHIM,SET_ELFNOTE,TYPES_TOKEN|TYPE_TUNER,0,0,lv,RACE_PLANT,ATTRIBUTE_FIRE) then - table.insert(exceptions,lv) - end - end - if chk==0 then return #exceptions<4 end - local declared_lv=Duel.AnnounceLevel(tp,1,4,exceptions) - e:SetLabel(declared_lv) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) -end -function s.tokenop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local lv=e:GetLabel() - if Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ELFNOTE_SERAPHIM,SET_ELFNOTE,TYPES_TOKEN|TYPE_TUNER,0,0,lv,RACE_PLANT,ATTRIBUTE_FIRE) then - local c=e:GetHandler() - local token=Duel.CreateToken(tp,TOKEN_ELFNOTE_SERAPHIM) - --Set the Token's Level to the declared Level - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetValue(lv) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)) - token:RegisterEffect(e1) - if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then - --While that Token is in the Monster Zone, the player who Summoned it cannot Special Summon from the Extra Deck, except "Elfnote" monsters - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetRange(LOCATION_MZONE) - e2:SetAbsoluteRange(tp,1,0) - e2:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_ELFNOTE) end) - e2:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)) - token:RegisterEffect(e2) - end - Duel.SpecialSummonComplete() - end -end \ No newline at end of file diff --git a/pre-release/c101305073.lua b/pre-release/c101305073.lua deleted file mode 100644 index d84e9f633e..0000000000 --- a/pre-release/c101305073.lua +++ /dev/null @@ -1,81 +0,0 @@ ---幻影騎士団アンブレイジベイル ---The Phantom Knights of Umbrage Veil ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --If you have a "The Phantom Knights" monster in your field or GY, 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(s.actcon) - c:RegisterEffect(e0) - --Special Summon this card in Defense Position as a Normal Monster (Warrior/DARK/Level 3/ATK 0/DEF 300) (this card is NOT treated as a Trap), then you can change 1 Attack Position monster your opponent controls to Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - 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) - --You can banish this card from your GY; immediately after this effect resolves, Xyz Summon 1 DARK Xyz Monster - 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:SetCost(Cost.SelfBanish) - e2:SetTarget(s.xyztg) - e2:SetOperation(s.xyzop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_THE_PHANTOM_KNIGHTS} -function s.actconfilter(c) - return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsMonster() and c:IsFaceup() -end -function s.actcon(e) - return Duel.IsExistingMatchingCard(s.actconfilter,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,0,300,3,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,0,300,3,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) then - c:AddMonsterAttribute(TYPE_NORMAL) - Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE) - c:AddMonsterAttributeComplete() - if Duel.SpecialSummonComplete()>0 and Duel.IsExistingMatchingCard(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,0,LOCATION_MZONE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) - local posg=Duel.SelectMatchingCard(tp,aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,0,LOCATION_MZONE,1,1,nil) - if #posg==0 then return end - Duel.HintSelection(posg) - Duel.BreakEffect() - Duel.ChangePosition(posg,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE) - end - end -end -function s.xyzfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsXyzSummonable() -end -function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.xyzop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() - if sc then - Duel.XyzSummon(tp,sc) - end -end \ No newline at end of file diff --git a/pre-release/c101305074.lua b/pre-release/c101305074.lua deleted file mode 100644 index 36db92087b..0000000000 --- a/pre-release/c101305074.lua +++ /dev/null @@ -1,86 +0,0 @@ ---S-Force ソート・ワールド ---S-Force Sorted World ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - e0:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e0) - --If you would banish a card(s) from the hand to activate the effect of an "S-Force" monster you control, you can send 1 "S-Force" card from your Deck to the GY instead, except "S-Force Sorted World" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_COST_REPLACE) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(1,0) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(s.repcon) - e1:SetValue(s.repval) - e1:SetOperation(s.repop) - c:RegisterEffect(e1) - --If another card(s) is banished: You can target 1 card in your opponent's field or GY; banish it, then you can move 1 "S-Force" monster you control to another of your Main Monster Zones - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_REMOVE) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) end) - e2:SetTarget(s.bantg) - e2:SetOperation(s.banop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_S_FORCE} -function s.repcostfilter(c,extracon,base,e,tp,eg,ep,ev,re,r,rp) - return c:IsSetCard(SET_S_FORCE) and not c:IsCode(id) and c:IsAbleToGraveAsCost() - and (not extracon or extracon(base,e,tp,eg,ep,ev,re,r,rp,c)) -end -function s.repcon(e) - return Duel.IsExistingMatchingCard(s.repcostfilter,e:GetHandlerPlayer(),LOCATION_DECK,0,1,nil) -end -function s.repval(base,extracon,e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local c=e:GetHandler() - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_S_FORCE) - and Duel.IsExistingMatchingCard(s.repcostfilter,tp,LOCATION_DECK,0,1,nil,extracon,base,e,tp,eg,ep,ev,re,r,rp) - end - return Chain.IsTriggeringControler(0,tp) and Chain.IsTriggeringLocation(0,LOCATION_MZONE) - and Chain.IsTriggeringPosition(0,POS_FACEUP) and Chain.IsTriggeringSetcode(0,SET_S_FORCE) - and Duel.IsExistingMatchingCard(s.repcostfilter,tp,LOCATION_DECK,0,1,nil,extracon,base,e,tp,eg,ep,ev,re,r,rp) -end -function s.repop(base,extracon,e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.repcostfilter,tp,LOCATION_DECK,0,1,1,nil,extracon,base,e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(g,REASON_COST) -end -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,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) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_REMOVED) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_S_FORCE),tp,LOCATION_MZONE,0,nil) - if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) - local sc=g:Select(tp,1,1,nil):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) - local zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0) - Duel.BreakEffect() - if tc:IsImmuneToEffect(e) then return end - Duel.MoveSequence(sc,math.log(zone,2)) - end -end diff --git a/pre-release/c101305075.lua b/pre-release/c101305075.lua deleted file mode 100644 index 2d59e5d1c0..0000000000 --- a/pre-release/c101305075.lua +++ /dev/null @@ -1,73 +0,0 @@ ---どきどきメルフィータイム ---Exciting Melffy Time ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Target 1 "Melffy" monster in your field or GY; return it to the hand, then you can Fusion Summon 1 Beast Fusion Monster from your Extra Deck, using monsters from your hand or field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - 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) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --If you control a "Melffy" Xyz Monster: You can banish this card from your GY; "Melffy" monsters you control that were Special Summoned from the Extra Deck are unaffected by your opponent's activated effects this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.immcon) - e2:SetCost(Cost.SelfBanish) - e2:SetOperation(s.immop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE) - c:RegisterEffect(e2) -end -s.listed_series={SET_MELFFY} -function s.rthfilter(c) - return c:IsSetCard(SET_MELFFY) and c:IsMonster() and c:IsFaceup() and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.rthfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rthfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.rthfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_FUSION_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then - Duel.ShuffleHand(tc:GetControler()) - local fusion_params={handler=c,fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_BEAST)} - if Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) - end - end -end -function s.immconfilter(c) - return c:IsSetCard(SET_MELFFY) and c:IsXyzMonster() and c:IsFaceup() -end -function s.immcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.immconfilter,tp,LOCATION_MZONE,0,1,nil) -end -function s.immop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) - --"Melffy" monsters you control that were Special Summoned from the Extra Deck are unaffected by your opponent's activated effects this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_MELFFY) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() end) - e1:SetValue(function(e,re) return re:GetHandlerPlayer()==1-e:GetHandlerPlayer() and re:IsActivated() end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101305076.lua b/pre-release/c101305076.lua deleted file mode 100644 index bab2fa209f..0000000000 --- a/pre-release/c101305076.lua +++ /dev/null @@ -1,96 +0,0 @@ ---道化の一座『終演』 ---Clown Crew "Finale" ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --If you control a Tribute Summoned monster: Discard any number of cards, then target that many face-up cards on the field; destroy them - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(Card.IsTributeSummoned,tp,LOCATION_MZONE,0,1,nil) end) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetCountLimit(1,{id,0}) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --You can banish this card from your GY and Tribute 1 Ritual, Fusion, Synchro, Xyz, Pendulum, or Link Monster from your hand or field; add 1 "Clown Crew" monster from your Deck or GY to your hand with a different original Level/Rank/Link Rating than the Tributed monster's - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCost(Cost.AND(Cost.SelfBanish,s.thcost)) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - e2:SetCountLimit(1,{id,1}) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_series={SET_CLOWN_CREW} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-1) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - local max_target_count=Duel.GetTargetCount(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - local discard_count=Duel.DiscardHand(tp,nil,1,max_target_count,REASON_COST|REASON_DISCARD,nil) - e:SetLabel(discard_count) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc~=c end - if chk==0 then - local cost_chk=e:GetLabel()==-1 - e:SetLabel(0) - return cost_chk and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) - end - local target_count=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local tg=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,target_count,target_count,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,#tg,tp,0) -end -function s.activate(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.rating(c) - if c:IsLinkMonster() then return c:GetLink() - elseif c:IsXyzMonster() then return c:GetOriginalRank() - else return c:GetOriginalLevel() end -end -function s.thcostfilter(c,tp) - return c:IsType(TYPE_RITUAL|TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ|TYPE_PENDULUM|TYPE_LINK) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,s.rating(c)) -end -function s.thfilter(c,lv) - return c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and c:IsAbleToHand() and s.rating(c)~=lv -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(-1) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.thcostfilter,1,1,true,nil,nil,tp) end - local sc=Duel.SelectReleaseGroupCost(tp,s.thcostfilter,1,1,true,nil,nil,tp):GetFirst() - Duel.Release(sc,REASON_COST) - e:SetLabel(s.rating(sc)) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local cost_chk=e:GetLabel()==-1 - e:SetLabel(0) - return cost_chk - 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 sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e:GetLabel()):GetFirst() - if sc then - if sc:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(sc) end - Duel.SendtoHand(sc,nil,REASON_EFFECT) - if sc:IsPreviousLocation(LOCATION_DECK) then Duel.ConfirmCards(1-tp,sc) end - end -end \ No newline at end of file diff --git a/pre-release/c101305077.lua b/pre-release/c101305077.lua deleted file mode 100644 index c9ad7a2821..0000000000 --- a/pre-release/c101305077.lua +++ /dev/null @@ -1,65 +0,0 @@ ---嗚呼な落とし穴 ---Oh my Trap Hole! ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When a monster effect is activated on your opponent's field during the turn they Special Summoned a monster(s): Destroy the monster that activated that effect, then destroy all opponent's cards in its adjacent Monster Zones and Spell & Trap Zones (if any) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Keep track of a player Special Summoning a monster - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_SPSUMMON_SUCCESS) - ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - for p=0,1 do - if eg:IsExists(Card.IsSummonPlayer,1,nil,p) then - Duel.RegisterFlagEffect(p,id,RESET_PHASE|PHASE_END,0,1) - end - end - end - ) - Duel.RegisterEffect(ge1,0) - end) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - if not (Duel.HasFlagEffect(1-tp,id) and re:IsMonsterEffect()) then return false end - local trig_loc,trig_ctrl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_CONTROLER) - return trig_ctrl==1-tp and trig_loc==LOCATION_MZONE and re:GetHandler():IsRelateToEffect(re) -end -function s.adjacentfilter(c,tp,rc,seq) - if c:IsControler(tp) then return false end - if c:IsLocation(LOCATION_SZONE) then - return rc:IsInMainMZone() and rc:GetColumnGroup():IsContains(c) and c:IsControler(rc:GetControler()) - elseif c:IsLocation(LOCATION_MZONE) then - if c:IsInExtraMZone() or rc:IsInExtraMZone() then - return rc:GetColumnGroup():IsContains(c) - else - return c:IsSequence(seq-1,seq+1) and c:IsControler(rc:GetControler()) - end - end - return false -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local rc=re:GetHandler() - rc:CreateEffectRelation(e) - local g=rc:GetColumnGroup(1,1):Match(s.adjacentfilter,nil,tp,rc,rc:GetSequence()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g+rc,#g+1,tp,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if not rc:IsRelateToEffect(re) then return end - local g=rc:GetColumnGroup(1,1):Match(s.adjacentfilter,nil,tp,rc,rc:GetSequence()) - if Duel.Destroy(rc,REASON_EFFECT)>0 and #g>0 then - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101305078.lua b/pre-release/c101305078.lua deleted file mode 100644 index 22aea6b5e6..0000000000 --- a/pre-release/c101305078.lua +++ /dev/null @@ -1,57 +0,0 @@ ---レーン・リストリクション ---Lane Restriction ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: You can Special Summon 1 of your banished monsters to your rightmost Main Monster Zone - 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:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --If your opponent would Normal or Special Summon a monster(s) to their Main Monster Zone, they must use the leftmost unused zone(s) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_FORCE_MZONE) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(0,1) - e2:SetValue(s.forcemzoneval) - c:RegisterEffect(e2) -end -local offset=Duel.IsDuelType(DUEL_3_COLUMNS_FIELD) and 1 or 0 -local LEFTMOST_SEQ=0+offset -local RIGHTMOST_SEQ=4-offset -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) -end -function s.spfilter(c,e,tp,rightmost_zone) - return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,rightmost_zone) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local rightmost_zone=1<0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP,rightmost_zone) - end - end -end -function s.forcemzoneval(e,fp,rp,r) - --Needs to somehow not affect Normal Sets, no way to do that atm - local opp=1-e:GetHandlerPlayer() - for seq=LEFTMOST_SEQ,RIGHTMOST_SEQ do - if Duel.CheckLocation(opp,LOCATION_MZONE,seq) then - return (1<0 and (trig_status&STATUS_SUMMONED_THIS_TURN)==0 - and Duel.IsChainNegatable(ev) -end -function s.notsummonturnfilter(c,tp) - return c:IsFaceup() and not c:IsStatus(STATUS_SUMMONED_THIS_TURN) and c:IsAbleToRemove(c,tp,POS_FACEDOWN) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) - local g=Duel.GetMatchingGroup(s.notsummonturnfilter,tp,0,LOCATION_MZONE,nil,tp) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) then - local g=Duel.GetMatchingGroup(s.notsummonturnfilter,tp,0,LOCATION_MZONE,nil,tp) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) - end - end -end -function s.setcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousPosition(POS_FACEDOWN) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) - and rp==1-tp and c:IsReason(REASON_EFFECT) -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsTrap,Card.IsSSetable),tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsTrap,Card.IsSSetable),tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101305080.lua b/pre-release/c101305080.lua deleted file mode 100644 index ab5c05c1a2..0000000000 --- a/pre-release/c101305080.lua +++ /dev/null @@ -1,61 +0,0 @@ ---護石の作庭 ---Protective Stone Gardenscaping ---scripted by Naim -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) - --While you have 5 cards in your Spell & Trap Zone, any battle damage a player takes is halved, also once per turn, you can activate 1 Continuous Trap Card the turn it was Set - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_FIELD) - e1a:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1a:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) - e1a:SetRange(LOCATION_SZONE) - e1a:SetTargetRange(1,1) - e1a:SetCondition(function(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_STZONE,0)==5 end) - e1a:SetValue(HALF_DAMAGE) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetDescription(aux.Stringid(id,0)) - e1b:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1b:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e1b:SetTargetRange(LOCATION_SZONE,0) - e1b:SetCountLimit(1) - c:RegisterEffect(e1b) - --During the Standby Phase: You can reveal 5 Continuous Traps with different names from your Deck, your opponent randomly picks 1 for you to Set on your field, also shuffle the rest into the Deck. You can only use this effect of "Protective Stone Gardenscaping" once per turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(function() return Duel.IsStandbyPhase() end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - e2:SetHintTiming(TIMING_STANDBY_PHASE) - c:RegisterEffect(e2) -end -function s.setfilter(c) - return c:IsContinuousTrap() and c:IsSSetable() and not c:IsPublic() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) - if chk==0 then return #g>=5 and g:GetClassCount(Card.GetCode)>=5 end - Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) - if #g<5 then return end - local rg=aux.SelectUnselectGroup(g,e,tp,5,5,aux.dncheck,1,tp,HINTMSG_CONFIRM) - Duel.ConfirmCards(1-tp,rg) - Duel.ShuffleDeck(tp) - local sg=rg:RandomSelect(1-tp,1) - if #sg>0 then - Duel.DisableShuffleCheck() - Duel.SSet(tp,sg,tp,false) - end -end \ No newline at end of file diff --git a/pre-release/c101305081.lua b/pre-release/c101305081.lua deleted file mode 100644 index dee1a2a065..0000000000 --- a/pre-release/c101305081.lua +++ /dev/null @@ -1,112 +0,0 @@ ---JP name ---Witness of the Ancient ---Scripted by The Razgriz -local s,id=GetID() -local TOKEN_ARC=id+100 -function s.initial_effect(c) - --If you have a Synchro Monster in your field or GY: 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 Special Summoned: You can place up to 3 Synchro Monsters with different names from your Extra Deck and/or GY in your Spell & Trap Zone as face-up Continuous Spells, and Special Summon 1 "Arc Token" (Machine/LIGHT/ATK 0/DEF 0) with a Level equal to the number placed, also for the rest of this turn, you cannot Special Summon from the Extra Deck, except Synchro Monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - 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(s.pltg) - e2:SetOperation(s.plop) - c:RegisterEffect(e2) -end -s.listed_names={TOKEN_ARC} -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSynchroMonster),tp,LOCATION_MZONE|LOCATION_GRAVE,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.plfilter(c) - return c:IsSynchroMonster() and not c:IsForbidden() -end -function s.rescon(tokenlv1chk,tokenlv2chk,tokenlv3chk,mzone_chk) - return function(sg,e,tp,mg) - if not mzone_chk then return sg:GetClassCount(Card.GetCode)==#sg end - return (#sg==1 and tokenlv1chk) - or (#sg==2 and tokenlv2chk) - or (#sg==3 and tokenlv3chk),sg:GetClassCount(Card.GetCode)~=#sg - end -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local stzone_count=Duel.GetLocationCount(tp,LOCATION_SZONE) - if stzone_count<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(s.plfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,nil) - if #g==0 then return false end - local tokenlv1chk=stzone_count>=1 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARC,0,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_LIGHT) - local tokenlv2chk=stzone_count>=2 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARC,0,TYPES_TOKEN,0,0,2,RACE_MACHINE,ATTRIBUTE_LIGHT) - local tokenlv3chk=stzone_count>=3 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARC,0,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_LIGHT) - return aux.SelectUnselectGroup(g,e,tp,1,math.min(3,stzone_count),s.rescon(tokenlv1chk,tokenlv2chk,tokenlv3chk,true),0) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local stzone_count=Duel.GetLocationCount(tp,LOCATION_SZONE) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.plfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,nil) - if stzone_count>0 and #g>0 then - local place_success_chk=false - local mzone_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - local tokenlv1chk=stzone_count>=1 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARC,0,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_LIGHT) - local tokenlv2chk=stzone_count>=2 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARC,0,TYPES_TOKEN,0,0,2,RACE_MACHINE,ATTRIBUTE_LIGHT) - local tokenlv3chk=stzone_count>=3 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARC,0,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_LIGHT) - local rescon=s.rescon(tokenlv1chk,tokenlv2chk,tokenlv3chk,mzone_chk) - local sg=aux.SelectUnselectGroup(g,e,tp,1,math.min(3,#g,stzone_count),rescon,1,tp,HINTMSG_TOFIELD,rescon) - for sc in sg:Iter() do - if Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then - place_success_chk=true - --Treated as a Continuous Spell - local e1=Effect.CreateEffect(c) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) - e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TURN_SET) - sc:RegisterEffect(e1) - end - end - if place_success_chk and mzone_chk then - local token=Duel.CreateToken(tp,TOKEN_ARC) - token:Level(#sg) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end - end - --For the rest of this turn, you cannot Special Summon from the Extra Deck, except Synchro Monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetTargetRange(1,0) - e2:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) - e2:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e2,tp) -end \ No newline at end of file diff --git a/pre-release/c101305082.lua b/pre-release/c101305082.lua deleted file mode 100644 index 83ddee8a82..0000000000 --- a/pre-release/c101305082.lua +++ /dev/null @@ -1,82 +0,0 @@ ---JP name ---Distrust Paranoia ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Take control of all your opponent's monsters in this card's column - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_CONTROL) - 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) - --If this Set card in its owner's control has left the field by an opponent's effect, and is now in the GY or banished: You can Special Summon this card as an Effect Monster (Fiend/DARK/Level 10/ATK 4000/DEF 4000) with the following effect (this card is NOT treated as a Trap) - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_LEAVE_FIELD) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --● Unaffected by your opponent's card effects activated in the same column - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_IMMUNE_EFFECT) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(function(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+1) - end) - e3:SetValue(function(e,te) - return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() and e:GetHandler():IsColumn(te:GetCardSequence(),te:GetCardControler(),te:GetCardLocation()) - end) - c:RegisterEffect(e3) -end -function s.ctrlfilter(c,tp) - return c:IsControler(1-tp) and c:IsLocation(LOCATION_MZONE) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local colg=c:GetColumnGroup():Match(s.ctrlfilter,nil,tp) - local ctrl_colg=colg:Filter(Card.IsAbleToChangeControler,nil) - local ctrl_colg_count=#ctrl_colg - if chk==0 then return #colg>0 and ctrl_colg_count==#colg and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>=ctrl_colg_count end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,ctrl_colg,ctrl_colg_count,tp,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local colg=c:GetColumnGroup():Match(s.ctrlfilter,nil,tp) - local ctrl_colg=colg:Filter(Card.IsAbleToChangeControler,nil) - local ctrl_colg_count=#ctrl_colg - local mzone_count=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL) - if ctrl_colg_count>0 and ctrl_colg_count==#colg and (mzone_count<=0 or mzone_count>=ctrl_colg_count) then - Duel.GetControl(ctrl_colg,tp) - end -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousPosition(POS_FACEDOWN) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and rp==1-tp - and c:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) -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.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,4000,4000,10,RACE_FIEND,ATTRIBUTE_DARK) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,4000,4000,10,RACE_FIEND,ATTRIBUTE_DARK) then - c:AddMonsterAttribute(TYPE_EFFECT) - c:AssumeProperty(ASSUME_RACE,RACE_FIEND) - Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP) - c:AddMonsterAttributeComplete() - Duel.SpecialSummonComplete() - end -end \ No newline at end of file diff --git a/pre-release/c101305083.lua b/pre-release/c101305083.lua deleted file mode 100644 index 071960e02e..0000000000 --- a/pre-release/c101305083.lua +++ /dev/null @@ -1,89 +0,0 @@ ---JP name ---Yomagna the Fire Phantom ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Must first be Special Summoned (from your hand) by shuffling 3 cards of the same type (Monster, Spell, or Trap) from your GY into the Deck/Extra Deck - local e0=Effect.CreateEffect(c) - e0:SetDescription(aux.Stringid(id,0)) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_SPSUMMON_PROC) - e0:SetRange(LOCATION_HAND) - e0:SetCondition(s.spcon) - e0:SetTarget(s.sptg) - e0:SetOperation(s.spop) - c:RegisterEffect(e0) - --If this card is Special Summoned: You can declare 1 Monster Type; this card becomes that Type until the end of this 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_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.typechangetg) - e1:SetOperation(s.typechangeop) - c:RegisterEffect(e1) - --During your Main Phase: You can Fusion Summon 1 Fusion Monster from your Extra Deck using monsters on either field, including this card - local fusion_params={ - matfilter=Fusion.OnFieldMat, - extrafil=function(e,tp,mg) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup),tp,0,LOCATION_ONFIELD,nil) - end, - gc=Fusion.ForcedHandler - } - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - 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) -end -function s.rescon(sg,e,tp,mg) - return sg:GetClassCount(Card.GetMainCardType)==1 -end -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - local g=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_GRAVE,0,nil) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>=3 and aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_GRAVE,0,nil) - local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TODECK,nil,nil,true) - if sg and #sg==3 then - e:SetLabelObject(sg) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local sg=e:GetLabelObject() - if sg and #sg==3 then - Duel.HintSelection(sg) - Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_COST) - end -end -function s.typechangetg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local declared_type=e:GetHandler():AnnounceAnotherRace(tp) - e:GetChainData().declared_type=declared_type -end -function s.typechangeop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local declared_type=e:GetChainData().declared_type - if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsRaceExcept(declared_type) then - --This card becomes that Type until the end of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetValue(declared_type) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101305084.lua b/pre-release/c101305084.lua deleted file mode 100644 index 92f23c0430..0000000000 --- a/pre-release/c101305084.lua +++ /dev/null @@ -1,71 +0,0 @@ ---JP name ---Thundercrash Snarecrow ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Each time a non-Thunder monster(s) is Special Summoned face-up, while this card is in the Monster Zone: That monster(s) cannot attack this turn, also destroy it during the End Phase. - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(0,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(aux.FaceupFilter(Card.IsRaceExcept,RACE_THUNDER),1,nil) - end) - e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=eg:Filter(aux.FaceupFilter(Card.IsRaceExcept,RACE_THUNDER),nil) - for tc in g:Iter() do - tc:CreateEffectRelation(e) - end - e:GetChainData().event_group=g - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - end) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --If this card is in your GY: You can target 1 face-up card you control; destroy it, and if you do, add this card to your hand. You can only use this effect of "Thundercrash Snarecrow' once per turn. - 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:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=e:GetChainData().event_group:Match(Card.IsRelateToEffect,nil,e) - if #g==0 then return end - local c=e:GetHandler() - for tc in g:Iter() do - --That monster(s) cannot attack this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end - --Also destroy it during the End Phase - aux.DelayedOperation(g,PHASE_END,id,e,tp,function(ag) Duel.Destroy(ag,REASON_EFFECT) end,nil,0,0,aux.Stringid(id,2),aux.Stringid(id,3)) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() 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.thop(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/c101305085.lua b/pre-release/c101305085.lua deleted file mode 100644 index 01189c1bf3..0000000000 --- a/pre-release/c101305085.lua +++ /dev/null @@ -1,96 +0,0 @@ ---JP name ---Mixousia the Confounder ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 Spellcaster monster + 1 non-Spellcaster monster - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),aux.FilterBoolFunctionEx(Card.IsRaceExcept,RACE_SPELLCASTER)) - --You can target 1 face-up monster on the field and declare 1 Attribute; it becomes that 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.fieldattrtg) - e1:SetOperation(s.fieldattrop) - c:RegisterEffect(e1) - --During your opponent's Main Phase (Quick Effect): You can Fusion Summon 1 Fusion Monster from your Extra Deck, by banishing this card you control and monsters from your field or GY as material - local fusion_params={ - handler=c, - gc=Fusion.ForcedHandler, - matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove), - extrafil=function(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) - end - return nil - end, - extraop=Fusion.BanishMaterial - } - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsMainPhase(1-tp) end) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) - --If this card is in your GY: You can declare 1 Attribute; this card in the GY becomes that Attribute until the end of this turn - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.selfattrtg) - e3:SetOperation(s.selfattrop) - c:RegisterEffect(e3) -end -function s.fieldattrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() - local declared_attribute=tc:AnnounceAnotherAttribute(tp) - e:GetChainData().declared_attribute=declared_attribute -end -function s.fieldattrop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local declared_attribute=e:GetChainData().declared_attribute - --It becomes that Attribute - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetValue(declared_attribute) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end -function s.selfattrtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local declared_attribute=c:AnnounceAnotherAttribute(tp) - e:GetChainData().declared_attribute=declared_attribute - --Operation info needed to handle the interaction with "Necrovalley" - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,LOCATION_GRAVE) -end -function s.selfattrop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local declared_attribute=e:GetChainData().declared_attribute - --This card in the GY becomes that Attribute until the end of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) - e1:SetValue(declared_attribute) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101305086.lua b/pre-release/c101305086.lua deleted file mode 100644 index 583d8f2bd2..0000000000 --- a/pre-release/c101305086.lua +++ /dev/null @@ -1,84 +0,0 @@ ---JP name ---Shamanite Shamanknight ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2+ Level 3 monsters - Xyz.AddProcedure(c,nil,3,2,nil,nil,Xyz.InfiniteMats) - --If this card is Xyz Summoned, or if a Trap you own is banished: You can target 1 of your banished Traps; attach it to this card - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1a:SetCode(EVENT_SPSUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetCondition(function(e) - return e:GetHandler():IsXyzSummoned() - end) - e1a:SetTarget(s.attachtg) - e1a:SetOperation(s.attachop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1b:SetCode(EVENT_REMOVE) - e1b:SetRange(LOCATION_MZONE) - e1b:SetCondition(s.attachcon) - c:RegisterEffect(e1b) - --You can detach any number of materials from this card, then target 1 DARK monster in your GY or banishment with a Level equal to the number detached; Special Summon it - 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_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.DetachChoiceFromSelf(function(e,tp) - return Duel.GetTargetGroup(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp):GetClass(Card.GetLevel) - end)) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -function s.attachfilter(c,xyzc,tp) - return c:IsTrap() and c:IsFaceup() and c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) -end -function s.attachtg(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_REMOVED) and s.attachfilter(chkc,c,tp) end - if chk==0 then return Duel.IsExistingTarget(s.attachfilter,tp,LOCATION_REMOVED,0,1,nil,c,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACH) - Duel.SelectTarget(tp,s.attachfilter,tp,LOCATION_REMOVED,0,1,1,nil,c,tp) -end -function s.attachop(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:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) then - Duel.Overlay(c,tc) - end -end -function s.trapfilter(c,tp) - return c:IsTrap() and c:IsFaceup() and c:IsOwner(tp) -end -function s.attachcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.trapfilter,1,nil,tp) -end -function s.spfilter(c,e,tp,level) - return c:IsAttribute(ATTRIBUTE_DARK) and c:HasLevel() and (not level or c:IsLevel(level)) 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:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.spfilter(chkc,e,tp,#e:GetChainData().cost_detached_materials) 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 - local level=#e:GetChainData().cost_detached_materials - 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,level) - 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 \ No newline at end of file diff --git a/pre-release/c101305087.lua b/pre-release/c101305087.lua deleted file mode 100644 index de1a71b34f..0000000000 --- a/pre-release/c101305087.lua +++ /dev/null @@ -1,76 +0,0 @@ ---JP name ---Cerynemesia, Mystical Beast of the Forest ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If this card is Normal or Special Summoned: You can banish (face-up) 1 Beast monster from your hand or face-up field until the End Phase; Special Summon 1 EARTH Beast monster from your Deck or GY, with an equal or lower Level than that monster's original Level, then your opponent can Special Summon 1 monster from their hand - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,id) - e1a:SetCost(s.spcost) - e1a:SetTarget(s.sptg) - e1a:SetOperation(s.spop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --Your opponent's monsters that can attack must attack the monster you control with the highest ATK (their choice, if tied) - local e2a=Effect.CreateEffect(c) - e2a:SetType(EFFECT_TYPE_FIELD) - e2a:SetCode(EFFECT_MUST_ATTACK) - e2a:SetRange(LOCATION_MZONE) - e2a:SetTargetRange(0,LOCATION_MZONE) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EFFECT_MUST_ATTACK_MONSTER) - e2b:SetValue(function(e,c) return Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil):GetMaxGroup(Card.GetAttack):IsContains(c) end) - c:RegisterEffect(e2b) -end -function s.spcostfilter(c,e,tp) - return c:IsRace(RACE_BEAST) and c:HasLevel() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) - and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,c:GetOriginalLevel()) -end -function s.spfilter(c,e,tp,lv) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_BEAST) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() - e:GetChainData().lv=sc:GetOriginalLevel() - local return_op_function=sc:IsLocation(LOCATION_MZONE) and aux.DefaultFieldReturnOp - or function(ag) - Duel.SendtoHand(ag,nil,REASON_EFFECT) - end - --Banish (face-up) 1 Beast monster from your hand or face-up field until the End Phase - aux.RemoveUntil(sc,POS_FACEUP,REASON_COST,PHASE_END,id,e,tp,return_op_function) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,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 - local lv=e:GetChainData().lv - 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,lv) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - local opp=1-tp - Duel.ShuffleDeck(tp) - if Duel.GetLocationCount(opp,LOCATION_MZONE,opp)>0 and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,opp,LOCATION_HAND,0,1,nil,e,0,opp,false,false) - and Duel.SelectYesNo(opp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_SPSUMMON) - local og=Duel.SelectMatchingCard(opp,Card.IsCanBeSpecialSummoned,opp,LOCATION_HAND,0,1,1,nil,e,0,opp,false,false) - if #og>0 then - Duel.BreakEffect() - Duel.SpecialSummon(og,0,opp,opp,false,false,POS_FACEUP) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101305088.lua b/pre-release/c101305088.lua deleted file mode 100644 index fcc6f75d21..0000000000 --- a/pre-release/c101305088.lua +++ /dev/null @@ -1,85 +0,0 @@ ---JP name ---Imposter Shift ---scripted by pyrQ -local s,id=GetID() -local TOKEN_IMPOSTER=id+100 -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --When a monster effect that was activated on your opponent's field by targeting a card(s) on the field resolves, if any of those targets are in a different column than that opponent's monster, they can banish 1 card from their GY. If they did not, negate the activated effect - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetRange(LOCATION_SZONE) - e1:SetCondition(s.discon) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --You can banish 1 monster from your GY; Special Summon 1 "Imposter Token" (Psychic/EARTH/ATK 800/DEF 800) with the same Level as that monster. You can only use this effect of "Imposter Shift" once per turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,id) - e2:SetCost(s.tokencost) - e2:SetTarget(s.tokentg) - e2:SetOperation(s.tokenop) - c:RegisterEffect(e2) -end -s.listed_names={TOKEN_IMPOSTER} -function s.discon(e,tp,eg,ep,ev,re,r,rp) - local opp=1-tp - local rc=re:GetHandler() - if re:IsMonsterEffect() and rc:IsRelateToEffect(re) and rc:IsControler(opp) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) - and Chain.IsTriggeringLocation(ev,LOCATION_MZONE) and Chain.IsTriggeringControler(ev,opp) and Chain.IsDisablable(ev) then - local tg=Chain.GetTargetCards(ev) - return tg and tg:IsExists(aux.AND(Card.IsRelateToEffect,Card.IsOnField),1,nil,re) - end - return false -end -function s.disconfilter(c,seq,ctrl) - return not c:IsColumn(seq,ctrl,LOCATION_MZONE) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local opp=1-tp - local tg=Chain.GetTargetCards(ev):Filter(aux.AND(Card.IsRelateToEffect,Card.IsOnField),nil,re) - if tg:IsExists(s.disconfilter,1,nil,re:GetHandler():GetSequence(),opp) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,opp,LOCATION_GRAVE,0,1,nil,opp) - and Duel.SelectYesNo(opp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(opp,Card.IsAbleToRemove,opp,LOCATION_GRAVE,0,1,1,nil,opp) - if #g>0 then - Duel.Remove(g,POS_FACEUP,REASON_EFFECT,nil,opp) - end - else - Duel.NegateEffect(ev) - end -end -function s.tokencostfilter(c,tp) - return c:HasLevel() and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0 and aux.SpElimFilter(c,true) - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_IMPOSTER,0,TYPES_TOKEN,800,800,c:GetLevel(),RACE_PSYCHIC,ATTRIBUTE_EARTH) -end -function s.tokencost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tokencostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sc=Duel.SelectMatchingCard(tp,s.tokencostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() - Duel.Remove(sc,POS_FACEUP,REASON_COST) - e:GetChainData().token_level=sc:GetLevel() -end -function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) -end -function s.tokenop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local token_level=e:GetChainData().token_level - if Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_IMPOSTER,0,TYPES_TOKEN,800,800,token_level,RACE_PSYCHIC,ATTRIBUTE_EARTH) then - local token=Duel.CreateToken(tp,TOKEN_IMPOSTER) - token:Level(token_level) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101305089.lua b/pre-release/c101305089.lua deleted file mode 100644 index a1128949d8..0000000000 --- a/pre-release/c101305089.lua +++ /dev/null @@ -1,126 +0,0 @@ ---JP name ---Mortilux Heruvur ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2+ Level 8 monsters - Xyz.AddProcedure(c,nil,8,2,nil,nil,Xyz.InfiniteMats) - --If a monster(s) is sent to your opponent's GY (except during the Damage Step): You can target 1 of them; attach it to this card. You can only use this effect of "Mortilux Heruvur" once per turn - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_LEAVE_GRAVE) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1a:SetCode(EVENT_CUSTOM+id) - e1a:SetRange(LOCATION_MZONE) - e1a:SetCountLimit(1,id) - e1a:SetTarget(s.attachtg) - e1a:SetOperation(s.attachop) - e1a:SetLabelObject(Group.CreateGroup()) - c:RegisterEffect(e1a) - --Keep track of monsters sent to the opponent's GY - local e1b=Effect.CreateEffect(c) - e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1b:SetCode(EVENT_TO_GRAVE) - e1b:SetRange(LOCATION_MZONE) - e1b:SetLabelObject(e1a) - e1b:SetOperation(s.regop) - c:RegisterEffect(e1b) - --This card gains effects based on the number of materials attached to it - --● 2+: Cannot be destroyed by battle or card effects - local e2a=Effect.CreateEffect(c) - e2a:SetType(EFFECT_TYPE_SINGLE) - e2a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2a:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2a:SetRange(LOCATION_MZONE) - e2a:SetCondition(s.xyzmatcountcon(2)) - e2a:SetValue(1) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e2b) - --● 3+: Your opponent cannot target cards in the GYs with card effects - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE) - e3:SetCondition(s.xyzmatcountcon(3)) - e3:SetValue(aux.tgoval) - c:RegisterEffect(e3) - --● 4+: You can detach 3 materials from this card; send 1 monster on the field to the GY - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_TOGRAVE) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(s.xyzmatcountcon(4)) - e4:SetCost(Cost.DetachFromSelf(3)) - e4:SetTarget(s.sendtogytg) - e4:SetOperation(s.sendtogyop) - c:RegisterEffect(e4) -end -function s.attachfilter(c,tp,e,xyzc) - return c:IsLocation(LOCATION_GRAVE) and c:IsMonster() and c:IsControler(1-tp) - and c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) and c:IsCanBeEffectTarget(e) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsDamageStep() then return end - local c=e:GetHandler() - local tg=eg:Filter(s.attachfilter,nil,tp,e,c) - if #tg>0 then - for tc in tg:Iter() do - tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) - end - local g=e:GetLabelObject():GetLabelObject() - if Duel.GetCurrentChain()==0 then g:Clear() end - g:Merge(tg) - g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) - e:GetLabelObject():SetLabelObject(g) - Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id,e,0,tp,tp,0) - end -end -function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local g=e:GetLabelObject():Filter(s.attachfilter,nil,tp,e,c) - if chkc then return g:IsContains(chkc) and s.attachfilter(chkc,tp,e,c) end - if chk==0 then return c:IsXyzMonster() and #g>0 end - local tc=nil - if #g==1 then - tc=g:GetFirst() - Duel.SetTargetCard(tc) - else - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACH) - tc=g:Select(tp,1,1,nil) - Duel.SetTargetCard(tc) - end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) -end -function s.attachop(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:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) then - Duel.Overlay(c,tc) - end -end -function s.xyzmatcountcon(required) - return function(e) - return e:GetHandler():GetOverlayCount()>=required - end -end -function s.sendtogytg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0) -end -function s.sendtogyop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,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/c101305090.lua b/pre-release/c101305090.lua deleted file mode 100644 index 65d351ed66..0000000000 --- a/pre-release/c101305090.lua +++ /dev/null @@ -1,94 +0,0 @@ ---JP name ---Angelechy Shatranga ---Scripted by Hatter -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) - --You can target 1 monster your opponent controls; banish it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.bantg) - e1:SetOperation(s.banop) - c:RegisterEffect(e1) - --If this card is placed in the Spell & Trap Zone as a Continuous Spell: You can add 1 "Angelechy" Trap from your Deck or GY to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_MOVE) - e2:SetRange(LOCATION_STZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.thcon) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --While this card is treated as a Continuous Spell, your opponent can only attempt to activate up to 5 monster effects per turn - local e3a=Effect.CreateEffect(c) - e3a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3a:SetCode(EVENT_CHAINING) - e3a:SetRange(LOCATION_STZONE) - e3a:SetCondition(function(e) - return e:GetHandler():IsContinuousSpell() - end) - e3a:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or not re:IsMonsterEffect() then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_CONTROL|RESET_PHASE|PHASE_END,0,1) - end) - c:RegisterEffect(e3a) - local e3b=Effect.CreateEffect(c) - e3b:SetType(EFFECT_TYPE_FIELD) - e3b:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3b:SetCode(EFFECT_CANNOT_ACTIVATE) - e3b:SetRange(LOCATION_STZONE) - e3b:SetTargetRange(0,1) - e3b:SetCondition(function(e) - return e:GetHandler():HasFlagEffect(id,5) - end) - e3b:SetValue(function(e,re) - return re:IsMonsterEffect() - end) - c:RegisterEffect(e3b) -end -s.listed_series={SET_ANGELECHY} -function s.bantg(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 - 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) -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 -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return eg:IsContains(c) and not c:IsPreviousLocation(LOCATION_SZONE) -end -function s.thfilter(c) - return c:IsSetCard(SET_ANGELECHY) and c:IsTrap() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsContinuousSpell() - 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) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() - if sc then - if sc:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(sc) end - Duel.SendtoHand(sc,nil,REASON_EFFECT) - if sc:IsPreviousLocation(LOCATION_DECK) then Duel.ConfirmCards(1-tp,sc) end - end -end \ No newline at end of file diff --git a/pre-release/c101305091.lua b/pre-release/c101305091.lua deleted file mode 100644 index 7256bf4fef..0000000000 --- a/pre-release/c101305091.lua +++ /dev/null @@ -1,86 +0,0 @@ ---JP name ---Angelechy Bastion ---Scripted by Hatter -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) - --You can target 1 other card in this card's column; banish it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.bantg) - e1:SetOperation(s.banop) - c:RegisterEffect(e1) - --If this card is placed in the Spell & Trap Zone as a Continuous Spell: You can place 1 "Angelechy Shatranga" from your Extra Deck in your Spell & Trap Zone as a face-up Continuous Spell - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_MOVE) - e2:SetRange(LOCATION_STZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.plcon) - e2:SetTarget(s.pltg) - e2:SetOperation(s.plop) - c:RegisterEffect(e2) - --While this card is treated as a Continuous Spell, other "Angelechy" cards on the field cannot be destroyed by your opponent's card effects - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetRange(LOCATION_STZONE) - e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - e3:SetTarget(function(e,c) return c~=e:GetHandler() and c:IsSetCard(SET_ANGELECHY) end) - e3:SetValue(aux.indoval) - c:RegisterEffect(e3) -end -s.listed_names={101305090} --"Angelechy Shatranga" -s.listed_series={SET_ANGELECHY} -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - local colg=c:GetColumnGroup():Match(Card.IsAbleToRemove,nil) - if chkc then return colg:IsContains(chkc) and chkc~=c end - if chk==0 then return colg:IsExists(Card.IsCanBeEffectTarget,1,nil,e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=colg:FilterSelect(tp,Card.IsCanBeEffectTarget,1,1,nil,e) - Duel.SetTargetCard(g) - 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 -function s.plcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return eg:IsContains(c) and not c:IsPreviousLocation(LOCATION_SZONE) -end -function s.plfilter(c) - return c:IsCode(101305090) and not c:IsForbidden() -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsContinuousSpell() - and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_EXTRA,0,1,nil) end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_SZONE)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() - if sc and Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then - --Treated as a Continuous Spell - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)) - sc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101305092.lua b/pre-release/c101305092.lua deleted file mode 100644 index 9b370a6faf..0000000000 --- a/pre-release/c101305092.lua +++ /dev/null @@ -1,94 +0,0 @@ ---JP name ---Angelechy Destrier ---Scripted by Hatter -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) - --You can target 1 monster in another column; banish it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.bantg) - e1:SetOperation(s.banop) - c:RegisterEffect(e1) - --If this card is placed in the Spell & Trap Zone as a Continuous Spell: You can add 1 "Angelechy" Spell 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_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_MOVE) - e2:SetRange(LOCATION_STZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.thcon) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --While this card is treated as a Continuous Spell, each time your opponent activates a card or effect, inflict 500 damage to your opponent when it resolves - local e3a=Effect.CreateEffect(c) - e3a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3a:SetCode(EVENT_CHAINING) - e3a:SetRange(LOCATION_STZONE) - e3a:SetCondition(function(e,tp,eg,ep) - return ep==1-tp and e:GetHandler():IsContinuousSpell() - end) - e3a:SetOperation(function(e) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) - end) - c:RegisterEffect(e3a) - local e3b=Effect.CreateEffect(c) - e3b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3b:SetCode(EVENT_CHAIN_SOLVED) - e3b:SetRange(LOCATION_STZONE) - e3b:SetCondition(function(e,tp,eg,ep) - return ep==1-tp and e:GetHandler():HasFlagEffect(id) - end) - e3b:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,id) - Duel.Damage(1-tp,500,REASON_EFFECT) - end) - c:RegisterEffect(e3b) -end -s.listed_series={SET_ANGELECHY} -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - local colg=c:GetColumnGroup():AddCard(c) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and not colg:IsContains(chkc) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,colg) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,colg) - 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 -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return eg:IsContains(c) and not c:IsPreviousLocation(LOCATION_SZONE) -end -function s.thfilter(c) - return c:IsSetCard(SET_ANGELECHY) and c:IsSpell() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsContinuousSpell() - and 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/c101305093.lua b/pre-release/c101305093.lua deleted file mode 100644 index 2c133633ad..0000000000 --- a/pre-release/c101305093.lua +++ /dev/null @@ -1,86 +0,0 @@ ---JP name ---Angelechy Enlisted ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1 non-Tuner - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,1) - --You can target 1 opponent's monster in this card's adjacent column; banish it, then change control of this card by moving it to one of your opponent's Main Monster Zones in this card's adjacent columns - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_CONTROL) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.bantg) - e1:SetOperation(s.banop) - c:RegisterEffect(e1) - --If the control of this face-up card changes: Return this card to the Extra Deck, then the owner of this card Special Summons 1 "Angelechy" monster from their Extra Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_CONTROL_CHANGED) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ANGELECHY} -function s.get_adjacent_zones(c) - if not c:IsLocation(LOCATION_MZONE) then return 0 end - local zones=0 - local seq=c:GetSequence() - if seq==5 then seq=1 elseif seq==6 then seq=3 end - if seq>0 then zones=1<<(5-seq) end --left zone - if seq<4 then zones=zones|(1<<(3-seq)) end --right zone - return zones -end -function s.banfilter(c,tp,zones) - return c:IsMonster() and c:IsControler(1-tp) and c:IsAbleToRemove() and Duel.GetMZoneCount(1-tp,c,tp,LOCATION_REASON_CONTROL,zones)>0 -end -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - local cg=c:GetColumnGroup(1,1):Sub(c:GetColumnGroup()):Match(s.banfilter,c,tp,s.get_adjacent_zones(c)) - if chkc then return cg:IsContains(chkc) end - if chk==0 then return cg:IsExists(Card.IsCanBeEffectTarget,1,nil,e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=cg:FilterSelect(tp,Card.IsCanBeEffectTarget,1,1,nil,e) - Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,c,1,tp,0) -end -function s.banop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local zones=s.get_adjacent_zones(c) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and c:IsRelateToEffect(e) - and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL,zones)>0 then - Duel.BreakEffect() - Duel.GetControl(c,1-tp,0,0,zones,tp) - end -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - local c=e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,c:GetOwner(),LOCATION_EXTRA) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ANGELECHY) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 - and c:IsLocation(LOCATION_EXTRA) then - local owner=c:GetOwner() - Duel.Hint(HINT_SELECTMSG,owner,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(owner,s.spfilter,owner,LOCATION_EXTRA,0,1,1,nil,e,owner) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,owner,owner,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c101305094.lua b/pre-release/c101305094.lua deleted file mode 100644 index ea5d4c14f3..0000000000 --- a/pre-release/c101305094.lua +++ /dev/null @@ -1,93 +0,0 @@ ---JP name ---Angelechy Problem ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - c:RegisterEffect(e0) - --Once per turn: You can discard 1 Spell/Trap; Special Summon 1 Level 2 "Angelechy" monster from your Extra Deck, and if you do, place 1 "Angelechy" monster from your Extra Deck to your Spell & Trap Zone as a face-up Continuous Spell - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_FZONE) - e1:SetCountLimit(1) - e1:SetCost(Cost.Discard(Card.IsSpellTrap)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --If a face-up "Angelechy" Monster Card(s) you control is destroyed by battle or card effect: You can return 1 "Angelechy" Monster Card you own from your Spell & Trap Zone to the Extra Deck, then you can Special Summon it - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e2:SetCondition(s.tdcon) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ANGELECHY} -function s.plfilter(c) - return c:IsSetCard(SET_ANGELECHY) and not c:IsForbidden() -end -function s.spfilter(c,e,tp) - return c:IsLevel(2) and c:IsSetCard(SET_ANGELECHY) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_EXTRA,0,1,c) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and 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 or Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==0 or Duel.GetLocationCount(tp,LOCATION_SZONE)==0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() - if sc and Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then - --Treated as a Continuous Spell - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_CHANGE_TYPE) - e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)) - sc:RegisterEffect(e1) - end -end -function s.tdconfilter(c,tp) - return c:IsPreviousSetCard(SET_ANGELECHY) and c:IsMonsterCard() and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE|REASON_EFFECT) -end -function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.tdconfilter,1,nil,tp) -end -function s.tdfilter(c,tp) - return c:IsSetCard(SET_ANGELECHY) and c:IsMonsterCard() and c:IsOwner(tp) and c:IsFaceup() and c:IsAbleToExtra() -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_STZONE,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_STZONE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local sc=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_STZONE,0,1,1,nil,tp):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - if Duel.SendtoDeck(sc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_EXTRA) - and Duel.GetLocationCountFromEx(tp,tp,nil,sc)>0 - and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101305095.lua b/pre-release/c101305095.lua deleted file mode 100644 index 5f47282473..0000000000 --- a/pre-release/c101305095.lua +++ /dev/null @@ -1,77 +0,0 @@ ---JP name ---Angelechy Disturbance ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Give control of 1 "Angelechy" monster you control to your opponent (until the End Phase), then if your opponent controls a face-up card(s) in its adjacent Monster Zones and/or Spell & Trap Zones, their effects are negated - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_CONTROL+CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.ctrltg) - e1:SetOperation(s.ctrlop) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --You can banish this card from your GY; add 1 "Angelechy" Spell/Trap from your Deck to your hand, except "Angelechy Disturbance" - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_ANGELECHY} -function s.ctrlfilter(c) - return c:IsSetCard(SET_ANGELECHY) and c:IsControlerCanBeChanged() and c:IsFaceup() -end -function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.ctrlfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,tp,LOCATION_MZONE) - Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_ONFIELD) -end -function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local tc=Duel.SelectMatchingCard(tp,s.ctrlfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() - if not (tc and Duel.GetControl(tc,1-tp,PHASE_END,1) and tc:IsControler(1-tp)) then return end - local c=e:GetHandler() - local break_chk=false - local function optnegate(loc,nseq) - local nc=Duel.GetFieldCard(1-tp,loc,nseq) - if nc and nc:IsNegatable() then - if not break_chk then - break_chk=true - Duel.BreakEffect() - end - nc:NegateEffects(c) - end - end - local seq=tc:GetSequence() - optnegate(LOCATION_SZONE,seq) --down - if seq>0 then optnegate(LOCATION_MZONE,seq-1) end --left - if seq<4 then optnegate(LOCATION_MZONE,seq+1) end --right - if seq==1 then optnegate(LOCATION_MZONE,5) elseif seq==3 then optnegate(LOCATION_MZONE,6) end --up -end -function s.thfilter(c) - return c:IsSetCard(SET_ANGELECHY) and c:IsSpellTrap() 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) -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/c101305096.lua b/pre-release/c101305096.lua deleted file mode 100644 index 86b909dc66..0000000000 --- a/pre-release/c101305096.lua +++ /dev/null @@ -1,82 +0,0 @@ ---JP name ---Angelechy Opening to e4 ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If your opponent goes first, you can also activate this card from your hand during the Standby Phase of their first turn - local e4a=Effect.CreateEffect(c) - e4a:SetType(EFFECT_TYPE_SINGLE) - e4a:SetCode(EFFECT_TRAP_ACT_IN_HAND) - e4a:SetCondition(function(e) - return Duel.GetTurnCount()==1 and Duel.IsStandbyPhase(1-e:GetHandlerPlayer()) - end) - c:RegisterEffect(e4a) - --Place 1 "Angelechy" Field Spell from your hand, Deck, or GY, face-up on your field, and if you do, Special Summon 1 Level 2 or 7 "Angelechy" monster from your Extra Deck to the Extra Monster Zone, and if you do that, place 1 "Angelechy" monster from your Extra Deck in your Spell & Trap Zone as a face-up Continuous Spell. Until the end of your next turn after this card resolves, you cannot Special Summon from the Extra Deck, except Synchro Monsters - local e4b=Effect.CreateEffect(c) - e4b:SetDescription(aux.Stringid(id,0)) - e4b:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4b:SetType(EFFECT_TYPE_ACTIVATE) - e4b:SetCode(EVENT_FREE_CHAIN) - e4b:SetTarget(s.pltg) - e4b:SetOperation(s.plop) - e4b:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e4b) -end -s.listed_series={SET_ANGELECHY} -function s.plfilter(c,field) - return c:IsSetCard(SET_ANGELECHY) and not c:IsForbidden() and (not field or c:IsFieldSpell()) -end -function s.spfilter(c,e,tp) - return c:IsLevel(2,7) and c:IsSetCard(SET_ANGELECHY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.GetLocationCountFromEx(tp,tp,nil,c,ZONES_EMZ)>0 and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_EXTRA,0,1,c) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local stzone_count=Duel.GetLocationCount(tp,LOCATION_SZONE) - if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then stzone_count=stzone_count-1 end - return stzone_count>0 and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,true) - and 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.plop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.plfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,true):GetFirst() - if tc then - local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) - if fc then - Duel.SendtoGrave(fc,REASON_RULE) - Duel.BreakEffect() - end - if Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) then - 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 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,ZONES_EMZ)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() - if sc and Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then - --Treated as a Continuous Spell - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e4:SetCode(EFFECT_CHANGE_TYPE) - e4:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) - e4:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)) - sc:RegisterEffect(e4) - end - end - end - end - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - local reset_count=Duel.IsTurnPlayer(tp) and 2 or 1 - --Until the end of your next turn after this card resolves, you cannot Special Summon from the Extra Deck, except Synchro Monsters - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e4:SetTargetRange(1,0) - e4:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) - e4:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) - Duel.RegisterEffect(e4,tp) -end \ No newline at end of file diff --git a/pre-release/c101305127.lua b/pre-release/c101305127.lua deleted file mode 100644 index e8cd3d508a..0000000000 --- a/pre-release/c101305127.lua +++ /dev/null @@ -1,3 +0,0 @@ ---黒き混沌の魔術師ブラック・カオス ---Black Chaos the Dark Chaos Magician -Duel.LoadCardScriptAlias(101305027) \ No newline at end of file diff --git a/pre-release/c101305128.lua b/pre-release/c101305128.lua deleted file mode 100644 index da3294bfb0..0000000000 --- a/pre-release/c101305128.lua +++ /dev/null @@ -1,3 +0,0 @@ ---光と闇の戦士カオス・ソルジャー ---Black Luster Soldier - Soldier of Light and Darkness -Duel.LoadCardScriptAlias(101305028) \ No newline at end of file diff --git a/pre-release/c101305129.lua b/pre-release/c101305129.lua deleted file mode 100644 index ad7d79c3f4..0000000000 --- a/pre-release/c101305129.lua +++ /dev/null @@ -1,3 +0,0 @@ ---混沌の三幻魔 ---Phantasmal Sacred Beasts of Chaos -Duel.LoadCardScriptAlias(101305029) \ No newline at end of file diff --git a/pre-release/c101402001.lua b/pre-release/c101402001.lua deleted file mode 100644 index 895363e772..0000000000 --- a/pre-release/c101402001.lua +++ /dev/null @@ -1,99 +0,0 @@ ---疾風の豹戦士パンサーウォリアー ---Swift Panther Warrior ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --During the Main Phase (Quick Effect): You can Tribute 1 other monster from your hand or field, then activate 1 of these effects; - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e1) - --Cannot declare an attack unless a monster(s) was Tributed this turn - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(function() return not Duel.HasFlagEffect(0,id) end) - c:RegisterEffect(e2) - --Keep track of a monster 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(function(e,tp,eg,ep,ev,re,r,rp) - if not Duel.HasFlagEffect(0,id) and eg:IsExists(function(c) return c:IsPreviousLocation(LOCATION_MZONE) or (not c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsMonsterCard()) end,1,nil) then - Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) - end - end) - Duel.RegisterEffect(ge1,0) - end) -end -s.listed_names={CARD_DARK_TIME_WIZARD,id} -function s.spcostfilter(c,e,tp) - return Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) -end -function s.spfilter(c,e,tp) - return c:ListsCode(CARD_DARK_TIME_WIZARD) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.tgfilter(c) - return c:IsSpellTrap() and c:ListsCode(CARD_DARK_TIME_WIZARD) and c:IsAbleToGrave() -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - --● Special Summon 1 monster that mentions "Dark Time Wizard" from your hand or Deck, except "Swift Panther Warrior" - local b1=Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,true,nil,c,e,tp) - --● Send 1 Spell/Trap that mentions "Dark Time Wizard" from your Deck to the GY - local b2=Duel.CheckReleaseGroupCost(tp,nil,1,true,nil,c) - and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 end - local filter_func=not b2 and s.spcostfilter or nil - local g=Duel.SelectReleaseGroupCost(tp,filter_func,1,1,true,nil,c,e,tp) - Duel.Release(g,REASON_COST) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - --● Special Summon 1 monster that mentions "Dark Time Wizard" from your hand or Deck, except "Swift Panther Warrior" - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) - --● Send 1 Spell/Trap that mentions "Dark Time Wizard" from your Deck to the GY - local b2=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) - 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_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) - elseif op==2 then - e:SetCategory(CATEGORY_TOGRAVE) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Special Summon 1 monster that mentions "Dark Time Wizard" from your hand or Deck, except "Swift Panther Warrior" - 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|LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - --● Send 1 Spell/Trap that mentions "Dark Time Wizard" from your Deck to the GY - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101402002.lua b/pre-release/c101402002.lua deleted file mode 100644 index 3cca922154..0000000000 --- a/pre-release/c101402002.lua +++ /dev/null @@ -1,70 +0,0 @@ ---ワイバーンの竜騎士 ---Alligator's Sword Dragon Knight ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Can attack directly - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetRange(LOCATION_MZONE) - c:RegisterEffect(e1) - --If this card is in your hand: You can reveal 1 other card in your hand that mentions "Dark Time Wizard"; Special Summon this card - 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.Reveal(function(c) return c:ListsCode(CARD_DARK_TIME_WIZARD) end,true)) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --If this card is Normal or Special Summoned: You can add up to 2 Spells/Traps with different names from each other that mention "Dark Time Wizard" from your Deck to your hand, then discard 1 card - local e3a=Effect.CreateEffect(c) - e3a:SetDescription(aux.Stringid(id,1)) - e3a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3a:SetProperty(EFFECT_FLAG_DELAY) - e3a:SetCode(EVENT_SUMMON_SUCCESS) - e3a:SetCountLimit(1,{id,1}) - e3a:SetTarget(s.thtg) - e3a:SetOperation(s.thop) - c:RegisterEffect(e3a) - local e3b=e3a:Clone() - e3b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3b) -end -s.listed_names={CARD_DARK_TIME_WIZARD} -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:IsSpellTrap() and c:ListsCode(CARD_DARK_TIME_WIZARD) 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) - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if #g==0 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,1,2,aux.dncheck,1,tp,HINTMSG_ATOHAND) - if #sg>0 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,sg) - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101402003.lua b/pre-release/c101402003.lua deleted file mode 100644 index b77208d9c6..0000000000 --- a/pre-release/c101402003.lua +++ /dev/null @@ -1,72 +0,0 @@ ---人造人間-サイコ・エナジー・ショッカー ---Jinzo - Energy Shocker ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --This card's name becomes "Jinzo" while in the field or GY - 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_JINZO) - c:RegisterEffect(e1) - --If this card is Normal or Special Summoned: You can destroy as many Traps your opponent controls as possible (if a card is Set, reveal it), then this card gains 300 ATK for each card destroyed this way - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,0)) - e2a:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,id) - e2a:SetTarget(s.destg) - e2a:SetOperation(s.desop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --Your opponent cannot activate Trap Cards or effects while you have another monster in your field or GY that mentions "Dark Time Wizard" - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EFFECT_CANNOT_ACTIVATE) - e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(0,1) - e3:SetCondition(s.cannotactcon) - e3:SetValue(function(e,re,tp) return re:IsTrapEffect() end) - c:RegisterEffect(e3) -end -s.listed_names={CARD_JINZO,CARD_DARK_TIME_WIZARD} -function s.desfilter(c) - return (c:IsTrap() and c:IsFaceup()) or (c:IsSpellTrap() and c:IsFacedown()) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsTrap),tp,0,LOCATION_ONFIELD,nil) - if #g>0 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - end - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_ONFIELD,nil) - if #g>0 then - local fdg=g:Filter(Card.IsFacedown,nil) - if #fdg>0 then Duel.ConfirmCards(tp,fdg) end - local traps=g:Filter(Card.IsTrap,nil) - if #traps==0 then return end - local c=e:GetHandler() - local destroy_count=Duel.Destroy(traps,REASON_EFFECT) - if destroy_count>0 and c:IsRelateToEffect(e) and c:IsFaceup() then - Duel.BreakEffect() - --This card gains 300 ATK for each card destroyed this way - c:UpdateAttack(300*destroy_count) - end - end -end -function s.cannotactconfilter(c) - return c:ListsCode(CARD_DARK_TIME_WIZARD) and c:IsMonster() and c:IsFaceup() -end -function s.cannotactcon(e) - return Duel.IsExistingMatchingCard(s.cannotactconfilter,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) -end \ No newline at end of file diff --git a/pre-release/c101402004.lua b/pre-release/c101402004.lua deleted file mode 100644 index 073d82346e..0000000000 --- a/pre-release/c101402004.lua +++ /dev/null @@ -1,69 +0,0 @@ ---大海の伝説-フィッシャーマン ---Fisherman, Legend of the Sea ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If your opponent activates a monster effect on the field, or when their monster declares an attack, and "Umi" or a card that mentions "Dark Time Wizard" other than "Fisherman, Legend of the Sea" is on the field: 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_FIELD+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY) - e1a:SetCode(EVENT_CHAINING) - e1a:SetRange(LOCATION_HAND) - e1a:SetCountLimit(1,{id,0}) - e1a: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 end) - e1a:SetTarget(s.sptg) - e1a:SetOperation(s.spop) - 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) - --If this card is Special Summoned: You can target 1 monster your opponent controls; destroy it, also return this card from the field to the hand during the End Phase of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) - 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.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_UMI,CARD_DARK_TIME_WIZARD,id} -function s.spconfilter(c) - return (c:IsCode(CARD_UMI) or (c:ListsCode(CARD_DARK_TIME_WIZARD) and not c:IsCode(id))) and c:IsFaceup() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,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.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,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),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 - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - --Return this card from the field to the hand during the End Phase of this turn - aux.DelayedOperation(c,PHASE_END,id,e,tp,function(ag) Duel.SendtoHand(ag,nil,REASON_EFFECT) end,nil,nil,nil,aux.Stringid(id,2)) - end -end \ No newline at end of file diff --git a/pre-release/c101402009.lua b/pre-release/c101402009.lua deleted file mode 100644 index 17f15084ba..0000000000 --- a/pre-release/c101402009.lua +++ /dev/null @@ -1,108 +0,0 @@ ---金神の戦鬼 アカスナ ---Akasuna the Golden Deity Asutra ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --You can Special Summon this card (from your hand) by revealing 1 face-down card you control and returning it to the hand/Extra Deck. You can only Special Summon "Akasuna the Golden Deity Asutra" once per turn this way - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --During the Main Phase (Quick Effect): You can send 1 Trap from your hand or face-down field to the GY; change all face-up monsters your opponent controls to face-down Defense Position - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_POSITION+CATEGORY_SET) - 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:SetCost(s.poscost) - e2:SetTarget(s.postg) - e2:SetOperation(s.posop) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e2) - --During your End Phase: You can Set 1 "Asutra" Trap from your Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_SET) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - 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.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -s.listed_series={SET_ASUTRA} -function s.spconfilter(c) - return c:IsFacedown() and (c:IsAbleToHandAsCost() or c:IsAbleToExtraAsCost()) -end -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) - return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) - local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_CONFIRM,nil,nil,true) - if g and #g>0 then - e:SetLabelObject(g) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if g and #g>0 then - Duel.ConfirmCards(1-tp,g) - Duel.SendtoHand(g,nil,REASON_COST) - end -end -function s.poscostfilter(c) - return c:IsTrap() and (c:IsFacedown() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost() -end -function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.poscostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.poscostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,tp,POS_FACEDOWN_DEFENSE) -end -function s.posop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil) - if #g>0 then - Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) - end -end -function s.setfilter(c) - return c:IsSetCard(SET_ASUTRA) and c:IsTrap() 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_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) -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_DECK,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101402010.lua b/pre-release/c101402010.lua deleted file mode 100644 index 6079b67ef6..0000000000 --- a/pre-release/c101402010.lua +++ /dev/null @@ -1,100 +0,0 @@ ---蟲神の色鬼 クズハ ---Kuzuha the Bewitching Deity Asutra ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --You can Special Summon this card (from your hand) by revealing 1 face-down card you control and returning it to the hand/Extra Deck. You can only Special Summon "Kuzuha the Bewitching Deity Asutra" once per turn this way - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --You can target up to 1 card on the field for every 2 face-down 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_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) - --During your End Phase: You can target 1 "Asutra" Trap in your GY; Set it - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_SET) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_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.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -s.listed_series={SET_ASUTRA} -function s.spconfilter(c) - return c:IsFacedown() and (c:IsAbleToHandAsCost() or c:IsAbleToExtraAsCost()) -end -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) - return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) - local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_CONFIRM,nil,nil,true) - if g and #g>0 then - e:SetLabelObject(g) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if g and #g>0 then - Duel.ConfirmCards(1-tp,g) - Duel.SendtoHand(g,nil,REASON_COST) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end - local facedown_count=Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if chk==0 then return facedown_count>=2 and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,facedown_count//2,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 -function s.setfilter(c) - return c:IsSetCard(SET_ASUTRA) and c:IsTrap() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SET,g,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SSet(tp,tc) - end -end \ No newline at end of file diff --git a/pre-release/c101402011.lua b/pre-release/c101402011.lua deleted file mode 100644 index c4464a1fa4..0000000000 --- a/pre-release/c101402011.lua +++ /dev/null @@ -1,110 +0,0 @@ ---疫神の依鬼 ヨア ---Yoa the Plague Deity Asutra ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --You can Special Summon this card (from your hand) by revealing 1 face-down card you control and returning it to the hand/Extra Deck. You can only Special Summon "Yoa the Plague Deity Asutra" once per turn this way - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --During your Main Phase: You can Set 1 "Asutra" Spell/Trap from your Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SET) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) - --During your opponent's turn (Quick Effect): You can target 1 face-up monster on the field; increase or decrease its Level by 1 - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_LVCHANGE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(function(e,tp) - return Duel.IsTurnPlayer(1-tp) - end) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.lvtg) - e3:SetOperation(s.lvop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -s.listed_series={SET_ASUTRA} -function s.spconfilter(c) - return c:IsFacedown() and (c:IsAbleToHandAsCost() or c:IsAbleToExtraAsCost()) -end -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) - return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) - local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_CONFIRM,nil,nil,true) - if g and #g>0 then - e:SetLabelObject(g) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if g and #g>0 then - Duel.ConfirmCards(1-tp,g) - Duel.SendtoHand(g,nil,REASON_COST) - end -end -function s.setfilter(c) - return c:IsSetCard(SET_ASUTRA) and c:IsSpellTrap() 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_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) -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_DECK,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:HasLevel() end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp,chk) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - local b1=true - local b2=tc:IsLevelAbove(2) - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,3)}, --Increase its Level by 1 - {b2,aux.Stringid(id,4)}) --Decrease its Level by 1 - local value=(op==1 and op) 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(value) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c101402012.lua b/pre-release/c101402012.lua deleted file mode 100644 index cfd1b16fa4..0000000000 --- a/pre-release/c101402012.lua +++ /dev/null @@ -1,100 +0,0 @@ ---封神の剣鬼 ミクマリ ---Mikumari the Sealing Deity Asutra ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can Special Summon this card (from your hand) by revealing 1 face-down card you control and returning it to the hand/Extra Deck. You can only Special Summon "Yoa the Plague Deity Asutra" once per turn this way - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --During your Main Phase: You can add 1 non-Wyrm "Asutra" monster from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --If this card is sent to the GY as Synchro Material for an "Asutra" monster: You can target 1 Normal Trap in your GY; Set it - 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+EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_BE_MATERIAL) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.setcon) - e3:SetTarget(s.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -s.listed_series={SET_ASUTRA} -function s.spconfilter(c) - return c:IsFacedown() and (c:IsAbleToHandAsCost() or c:IsAbleToExtraAsCost()) -end -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) - return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) - local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_CONFIRM,nil,nil,true) - if g and #g>0 then - e:SetLabelObject(g) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if g and #g>0 then - Duel.ConfirmCards(1-tp,g) - Duel.SendtoHand(g,nil,REASON_COST) - end -end -function s.thfilter(c) - return not c:IsRace(RACE_WYRM) and c:IsSetCard(SET_ASUTRA) 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.setcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and c:GetReasonCard():IsSetCard(SET_ASUTRA) -end -function s.setfilter(c) - return c:IsNormalTrap() and c:IsSSetable() -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SET,g,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SSet(tp,tc) - end -end \ No newline at end of file diff --git a/pre-release/c101402013.lua b/pre-release/c101402013.lua deleted file mode 100644 index 39c45ed737..0000000000 --- a/pre-release/c101402013.lua +++ /dev/null @@ -1,91 +0,0 @@ ---アトランティスの竜神-ダイダロス ---Atlantis Dragon Lord - Daedalus ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --This card's name becomes "Umi" while in the Monster Zone - 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) - e1:SetValue(CARD_UMI) - c:RegisterEffect(e1) - --If you control "Atlantis, the Dragon City" or "Umi": You can 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) - --You can send up to 3 face-up "Umi" you control to the GY; add that many cards that mention "Atlantis, the Dragon City" from your Deck to your hand, except Level 7 monsters, then you can send 1 card on the field to the GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.thcost) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_UMI,CARD_ATLANTIS_THE_DRAGON_CITY} -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_ATLANTIS_THE_DRAGON_CITY,CARD_UMI),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,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.thcostfilter(c) - return c:IsCode(CARD_UMI) and c:IsFaceup() and c:IsAbleToGraveAsCost() -end -function s.thfilter(c) - return c:ListsCode(CARD_ATLANTIS_THE_DRAGON_CITY) and not c:IsLevel(7) and c:IsAbleToHand() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end - local max_count=Duel.GetMatchingGroupCount(s.thfilter,tp,LOCATION_DECK,0,nil) - max_count=math.min(max_count,3) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_ONFIELD,0,1,max_count,nil) - Duel.SendtoGrave(g,REASON_COST) - e:GetChainData().search_count=#g -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_TOGRAVE,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local search_count=e:GetChainData().search_count - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,search_count,search_count,nil) - if #g==search_count and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.ShuffleDeck(tp) - if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #sg==0 then return end - Duel.HintSelection(sg) - Duel.BreakEffect() - Duel.SendtoGrave(sg,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101402014.lua b/pre-release/c101402014.lua deleted file mode 100644 index 68e664a4a0..0000000000 --- a/pre-release/c101402014.lua +++ /dev/null @@ -1,67 +0,0 @@ ---アトランティスの戦将 ---General of Atlantis ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --This card's name becomes "Umi" while in the Monster Zone - 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) - e1:SetValue(CARD_UMI) - c:RegisterEffect(e1) - --You can discard this card; add 1 Spell/Trap that mentions "Atlantis, the Dragon City" from your Deck 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_HAND) - e2:SetCountLimit(1,{id,0}) - e2:SetCost(Cost.SelfDiscard) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --If this card is in your GY and you control "Umi": You can 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}) - e3:SetCondition(s.spcon) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_UMI,CARD_ATLANTIS_THE_DRAGON_CITY} -function s.thfilter(c) - return c:IsSpellTrap() and c:ListsCode(CARD_ATLANTIS_THE_DRAGON_CITY) 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.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_UMI),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,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/c101402015.lua b/pre-release/c101402015.lua deleted file mode 100644 index 8c4299955f..0000000000 --- a/pre-release/c101402015.lua +++ /dev/null @@ -1,75 +0,0 @@ ---アトランティスの怪腕 ---Monstrous Arms of Atlantis ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --This card's name becomes "Umi" while in the Monster Zone - 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) - e1:SetValue(CARD_UMI) - c:RegisterEffect(e1) - --If this card is Normal or Special Summoned: You can target 1 monster in your GY that mentions "Atlantis, the Dragon City"; Special Summon it in Defense Position - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,0)) - e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,0}) - e2a:SetTarget(s.sptg) - e2a:SetOperation(s.spop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --When your opponent activates a monster effect (Quick Effect): You can banish this card from your field or GY and send 1 face-up "Umi" you control to the GY; negate that effect - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DISABLE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) - end) - e3:SetCost(Cost.AND(Cost.SelfBanish,s.discost)) - e3:SetTarget(function(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) - end) - e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateEffect(ev) - end) - c:RegisterEffect(e3) -end -s.listed_names={CARD_UMI,CARD_ATLANTIS_THE_DRAGON_CITY} -function s.spfilter(c,e,tp) - return c:ListsCode(CARD_ATLANTIS_THE_DRAGON_CITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end -end -function s.discostfilter(c) - return c:IsCode(CARD_UMI) and c:IsFaceup() and c:IsAbleToGraveAsCost() -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.discostfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.discostfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end \ No newline at end of file diff --git a/pre-release/c101402016.lua b/pre-release/c101402016.lua deleted file mode 100644 index 6650899826..0000000000 --- a/pre-release/c101402016.lua +++ /dev/null @@ -1,71 +0,0 @@ ---アトランティスの妖渦 ---Fiendish Vortex of Atlantis ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --This card's name becomes "Umi" while in the Monster Zone - 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) - e1:SetValue(CARD_UMI) - c:RegisterEffect(e1) - --If this card is Normal or Special Summoned: You can send 1 card that mentions "Atlantis, the Dragon City" from your Deck to the GY, except "Fiendish Vortex of Atlantis" - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,0)) - e2a:SetCategory(CATEGORY_TOGRAVE) - 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.tgtg) - e2a:SetOperation(s.tgop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --If this card is sent to the GY and you control "Umi": You can Special Summon 1 WATER monster from your hand - 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 -s.listed_names={CARD_UMI,CARD_ATLANTIS_THE_DRAGON_CITY,id} -function s.tgfilter(c) - return c:ListsCode(CARD_ATLANTIS_THE_DRAGON_CITY) and not c:IsCode(id) 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) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_WATER) 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) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_UMI),tp,LOCATION_ONFIELD,0,1,nil) 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 \ No newline at end of file diff --git a/pre-release/c101402021.lua b/pre-release/c101402021.lua deleted file mode 100644 index eb0e05d52b..0000000000 --- a/pre-release/c101402021.lua +++ /dev/null @@ -1,98 +0,0 @@ ---D-HERO デスドグマガイ ---Destiny HERO - Death Dogma ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustBeSpecialSummoned() - --Must be Special Summoned (from your hand or GY) by banishing 3 Warrior and/or DARK monsters from your GY. You can only Special Summon "Destiny HERO - Death Dogma" once per turn this way - local e0=Effect.CreateEffect(c) - e0:SetDescription(aux.Stringid(id,0)) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EFFECT_SPSUMMON_PROC) - e0:SetRange(LOCATION_HAND|LOCATION_GRAVE) - e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e0:SetCondition(s.spcon) - e0:SetTarget(s.sptg) - e0:SetOperation(s.spop) - e0:SetValue(1) - c:RegisterEffect(e0) - --If Summoned this way: You can activate this effect; inflict 2000 damage to your opponent during the next Standby Phase - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_DAMAGE) - 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():IsSummonType(SUMMON_TYPE_SPECIAL+1) end) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - c:RegisterEffect(e1) - --Once per turn, when your opponent activates a card or effect (Quick Effect): You can Fusion Summon 1 DARK or Warrior Fusion Monster from your Extra Deck, by shuffling its materials from your hand, field, and/or GY into the Deck - local fusion_params={ - fusfilter=function(c) - return c:IsAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_WARRIOR) - end, - extratg=function(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_HAND|LOCATION_MZONE|LOCATION_GRAVE) - end, - extraop=Fusion.ShuffleMaterial, - extrafil=function(e,tp,mg) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE,0,nil) - end - } - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,2)) - e2:SetCategory(CATEGORY_FUSION_SUMMON+CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2) -end -s.listed_names={id} -function s.spcostfilter(c) - return (c:IsRace(RACE_WARRIOR) or c:IsAttribute(ATTRIBUTE_DARK)) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) -end -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,c) - return #g>=3 and Duel.GetMZoneCount(tp,g)>0 and aux.SelectUnselectGroup(g,e,tp,3,3,aux.ChkfMMZ(1),0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,c) - local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) - if sg and #sg==3 then - e:SetLabelObject(sg) - return true - end - return false -end -function s.spop(e,tp,eg,ep,ev,re,r,rp,c) - local sg=e:GetLabelObject() - if sg and #sg==3 then - Duel.Remove(sg,POS_FACEUP,REASON_COST) - end -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,0,1,aux.Stringid(id,3),RESET_PHASE|PHASE_STANDBY) - --Inflict 2000 damage to your opponent during the next Standby Phase - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCountLimit(1) - e1:SetOperation(function() Duel.Hint(HINT_CARD,0,id) Duel.Damage(1-tp,2000,REASON_EFFECT) end) - e1:SetReset(RESET_PHASE|PHASE_STANDBY) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101402022.lua b/pre-release/c101402022.lua deleted file mode 100644 index 2cd1848c4a..0000000000 --- a/pre-release/c101402022.lua +++ /dev/null @@ -1,89 +0,0 @@ ---D-HERO デビルロードガイ ---Destiny HERO - Doom Liege ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card is Normal or Special Summoned: You can target 1 monster your opponent controls; banish it until the next Standby Phase - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_REMOVE) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1a:SetCode(EVENT_SUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetTarget(s.bantg) - e1a:SetOperation(s.banop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e1b) - --You can send 1 "Destiny HERO" monster from your Deck to the GY; add 1 "Clock Tower Prison" or "Clock Tower Prison City - Dark City" from your Deck or GY to your hand, also you cannot Special Summon for the rest of this turn, except DARK "HERO" monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.thcost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_names={75041269,101402062} --"Clock Tower Prison", "Clock Tower Prison City - Dark City" -s.listed_series={SET_DESTINY_HERO,SET_HERO} -function s.bantg(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:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end - 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) -end -function s.banop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local reset_count=1 - local return_condition=nil - if Duel.IsStandbyPhase() then - local turn_count=Duel.GetTurnCount() - reset_count=2 - return_condition=function() return Duel.GetTurnCount()~=turn_count end - end - --Banish it until the next Standby Phase - aux.RemoveUntil(tc,nil,REASON_EFFECT,PHASE_STANDBY,id,e,tp,aux.DefaultFieldReturnOp,return_condition,nil,reset_count) - end -end -function s.thcostfilter(c) - return c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster() and c:IsAbleToGraveAsCost() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.thfilter(c) - return c:IsCode(75041269,101402062) 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|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 sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() - if sc then - if sc:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(sc) end - Duel.SendtoHand(sc,nil,REASON_EFFECT) - if sc:IsPreviousLocation(LOCATION_DECK) then Duel.ConfirmCards(1-tp,sc) end - end - --You cannot Special Summon for the rest of this turn, except DARK "HERO" 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:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(SET_HERO)) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101402023.lua b/pre-release/c101402023.lua deleted file mode 100644 index 9bd879fafe..0000000000 --- a/pre-release/c101402023.lua +++ /dev/null @@ -1,90 +0,0 @@ ---D-HERO ドレッドノートサーヴァント ---Destiny HERO - Dreadnought Servant ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --If you control a "Destiny HERO" monster or a face-up Field Spell: You can Special Summon this card from your hand, then you can destroy 1 card you control, and if you do, add 1 "Polymerization" from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+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) - --If you Special Summon a Level 8 "Destiny HERO" monster(s): You can banish this card from your GY, then target 1 card your opponent controls; place it on top of the Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.tdcon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DESTINY_HERO} -s.listed_names={CARD_POLYMERIZATION} -function s.spconfilter(c) - return (c:IsSetCard(SET_DESTINY_HERO) or c:IsFieldSpell()) and c:IsFaceup() -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE|LOCATION_FZONE,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) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD) - 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 - and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>0 - 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_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil) - if #g==0 then return end - Duel.HintSelection(g) - Duel.BreakEffect() - if Duel.Destroy(g,REASON_EFFECT)>0 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.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end - end - end -end -function s.tdconfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsLevel(8) and c:IsSetCard(SET_DESTINY_HERO) and c:IsFaceup() -end -function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.tdconfilter,1,nil,tp) -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) -end -function s.tdop(e) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101402024.lua b/pre-release/c101402024.lua deleted file mode 100644 index 37fcc633b4..0000000000 --- a/pre-release/c101402024.lua +++ /dev/null @@ -1,83 +0,0 @@ ---魔救の調律者 ---Adamancipator Conductor ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If this card is in your hand: You can place 1 other "Adamancipator" card from your hand on top of the Deck; Special Summon this card - 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.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --During your Main Phase: You can excavate the top 5 cards of your Deck, and if you do, you can Special Summon 1 excavated Level 4 or lower Rock monster, also place the rest on the bottom of the Deck in any order - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.excavtg) - e2:SetOperation(s.excavop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ADAMANCIPATOR} -function s.spcostfilter(c) - return c:IsSetCard(SET_ADAMANCIPATOR) and c:IsAbleToDeckAsCost() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_COST) - Duel.ConfirmDecktop(tp,1) -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.excavtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.excavspfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.excavop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - Duel.ConfirmDecktop(tp,5) - local excavg=Duel.GetDecktopGroup(tp,5) - local remaining_count=#excavg - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local g=excavg:Match(s.excavspfilter,nil,e,tp) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,1,nil) - if #sg>0 then - Duel.DisableShuffleCheck() - remaining_count=remaining_count-1 - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - end - end - end - if remaining_count>0 then - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>remaining_count then - Duel.MoveToDeckBottom(remaining_count,tp) - end - Duel.SortDeckbottom(tp,tp,remaining_count) - end -end \ No newline at end of file diff --git a/pre-release/c101402025.lua b/pre-release/c101402025.lua deleted file mode 100644 index 8e2c092e6c..0000000000 --- a/pre-release/c101402025.lua +++ /dev/null @@ -1,82 +0,0 @@ ---魔救の奇石-ティアマイト ---Adamancipator Crystal - Tiamite ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If this card is Special Summoned by an "Adamancipator" card's effect: You can add 1 "Adamancipator" card from your Deck to your hand, except "Adamancipator Crystal - Tiamite", then you can Special Summon 1 Rock monster from 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,0}) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) - return re and re:IsCardSetcode(SET_ADAMANCIPATOR) and re:IsHasType(EFFECT_TYPE_ACTIONS) - end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If this card is in your GY: You can target 1 Rock Synchro Monster in your field or GY; return it to the Extra Deck, and if you do, place this card on top of the Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_ADAMANCIPATOR} -function s.thfilter(c) - return c:IsSetCard(SET_ADAMANCIPATOR) 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.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spfilter(c,e,tp) - return c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -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 or Duel.SendtoHand(g,nil,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_HAND) then return end - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.ShuffleDeck(tp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end - local hg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if #hg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local hsg=hg:Select(tp,1,1,nil) - if #hsg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(hsg,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.tdfilter(c) - return c:IsRace(RACE_ROCK) and c:IsSynchroMonster() and c:IsFaceup() and c:IsAbleToExtra() -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeck() - and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_EXTRA) - and c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)>0 then - Duel.ConfirmDecktop(tp,1) - end -end \ No newline at end of file diff --git a/pre-release/c101402030.lua b/pre-release/c101402030.lua deleted file mode 100644 index 5c84ecd0ee..0000000000 --- a/pre-release/c101402030.lua +++ /dev/null @@ -1,89 +0,0 @@ ---死相の冥鑑ヒュブロ ---Hubolt the Dark Directory of Death ---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(function(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) - c:RegisterEffect(e1) - --If this card is Normal or Special Summoned: You can send 1 Level 6 or higher Zombie monster from your Deck to the GY, except "Hubolt the Dark Directory of Death", then you can add 1 Level 6 or higher Zombie monster from your GY to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND) - 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.tgtg) - e2a:SetOperation(s.tgop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) - --If a monster(s) is Special Summoned from the GY while this card is in the Monster Zone, you can: Immediately after this effect resolves, Xyz Summon 1 Zombie Xyz Monster - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsSummonLocation,1,nil,LOCATION_GRAVE) - end) - e3:SetTarget(s.xyztg) - e3:SetOperation(s.xyzop) - c:RegisterEffect(e3) -end -s.listed_names={id} -function s.tgfilter(c) - return c:IsLevelAbove(6) and c:IsRace(RACE_ZOMBIE) and not c:IsCode(id) 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.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) -end -function s.thfilter(c) - return c:IsLevelAbove(6) and c:IsRace(RACE_ZOMBIE) and c:IsAbleToHand() -end -function s.tgop(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,0,1,1,nil):GetFirst() - if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) then - Duel.ShuffleDeck(tp) - if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.SendtoHand(g,nil,REASON_EFFECT) - end - end - end -end -function s.xyzfilter(c) - return c:IsRace(RACE_ZOMBIE) and c:IsXyzSummonable() -end -function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.xyzop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() - if sc then - Duel.XyzSummon(tp,sc) - end -end \ No newline at end of file diff --git a/pre-release/c101402032.lua b/pre-release/c101402032.lua deleted file mode 100644 index 6eb3cb9ce2..0000000000 --- a/pre-release/c101402032.lua +++ /dev/null @@ -1,70 +0,0 @@ ---グリズリーファザー ---Father Grizzly ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --When this card is destroyed by battle and sent to the GY: You can Special Summon 1 Level 4 monster with 1400 ATK from your Deck, or if you have 2 or more Level 4 monsters with 1400 ATK in your GY, you can Special Summon 1 Normal Monster instead - 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:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(function(e) - return e:GetHandler():IsLocation(LOCATION_GRAVE) - end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --When your opponent activates a monster effect and you control a face-up non-Effect Monster (Quick Effect): You can banish this card from your GY; negate the activation, and if you do, destroy that monster. You can only use this effect of "Father Grizzly" once per turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsNonEffectMonster),tp,LOCATION_MZONE,0,1,nil) - end) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(function(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) - e2:SetOperation(function(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) - c:RegisterEffect(e2) -end -function s.normalspconfilter(c) - return c:IsLevel(4) and c:IsAttack(1400) -end -function s.spfilter(c,e,tp,normal_chk) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((c:IsLevel(4) and c:IsAttack(1400)) - or (normal_chk and c:IsType(TYPE_NORMAL))) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local normal_chk=Duel.IsExistingMatchingCard(s.normalspconfilter,tp,LOCATION_GRAVE,0,2,nil) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,normal_chk) - 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 - local normal_chk=Duel.IsExistingMatchingCard(s.normalspconfilter,tp,LOCATION_GRAVE,0,2,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,normal_chk) - 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/c101402035.lua b/pre-release/c101402035.lua deleted file mode 100644 index 507e219fd1..0000000000 --- a/pre-release/c101402035.lua +++ /dev/null @@ -1,83 +0,0 @@ ---一日万倍龍 ---Myriaday Dragon ---Scripted by The Razgriz -local s,id=GetID() -local COUNTER_MYRIAD=0x21d -function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_MYRIAD) - --Once per turn, during the End Phase: You can pay 100 LP; place 1 Myriad 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_O) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCost(Cost.PayLP(100)) - e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsCanAddCounter(COUNTER_MYRIAD,1) end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,1,tp,COUNTER_MYRIAD) - end) - e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - c:AddCounter(COUNTER_MYRIAD,1) - end - end) - c:RegisterEffect(e1) - --Once per turn, during your Main Phase: You can place 1 Myriad Counter on this card for every 1000 points difference between your LP and your opponent's - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_COUNTER) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1) - e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local number_of_counters=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))//1000 - if chk==0 then return number_of_counters>0 and c:IsCanAddCounter(COUNTER_MYRIAD,number_of_counters) end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,number_of_counters,tp,COUNTER_MYRIAD) - end) - e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local number_of_counters=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))//1000 - if number_of_counters>0 then - c:AddCounter(COUNTER_MYRIAD,number_of_counters) - end - end) - c:RegisterEffect(e2) - --Gains 10,000 ATK/DEF while it has 10 or more Myriad Counters - local e3a=Effect.CreateEffect(c) - e3a:SetType(EFFECT_TYPE_SINGLE) - e3a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3a:SetCode(EFFECT_UPDATE_ATTACK) - e3a:SetRange(LOCATION_MZONE) - e3a:SetCondition(function(e) - return e:GetHandler():GetCounter(COUNTER_MYRIAD)>=10 - end) - e3a:SetValue(10000) - c:RegisterEffect(e3a) - local e3b=e3a:Clone() - e3b:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e3b) - --If this card would be destroyed by battle or card effect, remove 1 Myriad Counter from it instead - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e4:SetCode(EFFECT_DESTROY_REPLACE) - e4:SetRange(LOCATION_MZONE) - e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local c=e:GetHandler() - return not c:IsReason(REASON_REPLACE|REASON_RULE) and c:HasCounter(COUNTER_MYRIAD,1) - end - return true - end) - e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RemoveCounter(tp,COUNTER_MYRIAD,1,REASON_EFFECT) - end) - c:RegisterEffect(e4) -end -s.counter_place_list={COUNTER_MYRIAD} \ No newline at end of file diff --git a/pre-release/c101402036.lua b/pre-release/c101402036.lua deleted file mode 100644 index bcc624378b..0000000000 --- a/pre-release/c101402036.lua +++ /dev/null @@ -1,117 +0,0 @@ ---真紅眼の超越黒竜 ---Red-Eyes Black Dragon Exceed ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: "Red-Eyes Black Dragon" + 1 monster that mentions "Dark Time Wizard" - Fusion.AddProcMix(c,true,true,CARD_REDEYES_B_DRAGON,aux.FilterBoolFunction(Card.ListsCode,CARD_DARK_TIME_WIZARD)) - c:AddMustBeFusionSummoned() - --Must be either Fusion Summoned, or Special Summoned (from your Extra Deck) by Tributing 1 face-up monster on either field during the turn a monster(s) was destroyed by the effect of "Dark Time Wizard" - local e0a=Effect.CreateEffect(c) - e0a:SetDescription(aux.Stringid(id,0)) - e0a:SetType(EFFECT_TYPE_FIELD) - e0a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0a:SetCode(EFFECT_SPSUMMON_PROC) - e0a:SetRange(LOCATION_EXTRA) - e0a:SetCondition(s.selfspcon) - e0a:SetTarget(s.selfsptg) - e0a:SetOperation(s.selfspop) - e0a:SetValue(1) - c:RegisterEffect(e0a) - --You can only Special Summon "Red-Eyes Black Dragon Exceed" once per turn this way, no matter which method you use - local e0b=Effect.CreateEffect(c) - e0b:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e0b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0b:SetCode(EVENT_SPSUMMON_SUCCESS) - e0b:SetCondition(s.regcon) - e0b:SetOperation(s.regop) - c:RegisterEffect(e0b) - --Keep track of a monster being destroyed by the effect of "Dark Time Wizard" - aux.GlobalCheck(s,function() - local ge1=Effect.CreateEffect(c) - ge1:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_DESTROYED) - ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - if r&REASON_EFFECT>0 and re:GetHandler():IsCode(CARD_DARK_TIME_WIZARD) then - Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) - end - end) - Duel.RegisterEffect(ge1,0) - end) - --If this card is Special Summoned: You can Special Summon 1 Level 8 or lower monster from your hand or GY - 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:SetTarget(s.lv8sptg) - e1:SetOperation(s.lv8spop) - c:RegisterEffect(e1) - --Unaffected by your opponent's activated monster and Spell effects - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(function(e,te) return te:GetOwnerPlayer()==1-e:GetHandlerPlayer() and te:IsActivated() and (te:IsMonsterEffect() or te:IsSpellEffect()) end) - c:RegisterEffect(e2) -end -s.listed_names={CARD_REDEYES_B_DRAGON,CARD_DARK_TIME_WIZARD,id} -s.material={CARD_REDEYES_B_DRAGON} -s.material_setcode={SET_RED_EYES} -function s.selfspcostfilter(c,tp,fc) - return c:IsReleasable() and c:IsFaceup() and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION,tp) - and Duel.GetLocationCountFromEx(tp,tp,c,fc)>0 -end -function s.selfspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.HasFlagEffect(0,id) and Duel.CheckReleaseGroup(tp,s.selfspcostfilter,1,false,1,true,c,tp,nil,true,nil,tp,c) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.SelectReleaseGroup(tp,s.selfspcostfilter,1,1,false,true,true,c,tp,nil,true,nil,tp,c) - if g and #g>0 then - e:SetLabelObject(g) - return true - end - return false -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if g and #g>0 then - Duel.Release(g,REASON_COST|REASON_MATERIAL) - end -end -function s.regcon(e) - local c=e:GetHandler() - return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - --You can only Special Summon "Red-Eyes Black Dragon Exceed" once per turn this way, no matter which method you use - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCodeRule(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.lv8spfilter(c,e,tp) - return c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.lv8sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.lv8spfilter,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.lv8spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.lv8spfilter),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/c101402037.lua b/pre-release/c101402037.lua deleted file mode 100644 index 71e665b759..0000000000 --- a/pre-release/c101402037.lua +++ /dev/null @@ -1,106 +0,0 @@ ---D-HERO ドレッドノートガイ ---Destiny HERO - Dreadnought ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 2 Level 5 or higher "Destiny HERO" monsters - Fusion.AddProcMixN(c,true,true,s.matfilter,2) - --Must be either Fusion Summoned, or Special Summoned (from your Extra Deck) by Tributing 1 "Destiny HERO - Dreadmaster" - c:AddMustBeFusionSummoned() - local e0a=Effect.CreateEffect(c) - e0a:SetDescription(aux.Stringid(id,0)) - e0a:SetType(EFFECT_TYPE_FIELD) - e0a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0a:SetCode(EFFECT_SPSUMMON_PROC) - e0a:SetRange(LOCATION_EXTRA) - e0a:SetCondition(s.selfspcon) - e0a:SetTarget(s.selfsptg) - e0a:SetOperation(s.selfspop) - e0a:SetValue(1) - c:RegisterEffect(e0a) - --You can only Special Summon "Destiny HERO - Dreadnought" once per turn this way, no matter which method you use - local e0b=Effect.CreateEffect(c) - e0b:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e0b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0b:SetCode(EVENT_SPSUMMON_SUCCESS) - e0b:SetCondition(s.regcon) - e0b:SetOperation(s.regop) - c:RegisterEffect(e0b) - --If this card is Special Summoned: You can add 2 "Destiny HERO" monsters and/or cards that mention a "Destiny HERO" monster's card name from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - 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:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --This card's ATK becomes the total original ATK of all other "Destiny HERO" monsters in your field and GY - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_SET_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(function(e,c) return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_DESTINY_HERO),c:GetControler(),LOCATION_MZONE|LOCATION_GRAVE,0,c):GetSum(Card.GetBaseAttack) end) - c:RegisterEffect(e2) -end -s.listed_names={40591390} --"Destiny HERO - Dreadmaster" -s.listed_series={SET_DESTINY_HERO} -s.material_setcode={SET_DESTINY_HERO,SET_HERO} -function s.matfilter(c,fc,sumtype,sump) - return c:IsLevelAbove(5) and c:IsSetCard(SET_DESTINY_HERO,fc,sumtype,sump) -end -function s.selfspcostfilter(c,tp,fc) - return c:IsSummonCode(fc,MATERIAL_FUSION,tp,40591390) and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION,tp) and Duel.GetLocationCountFromEx(tp,tp,c,fc)>0 -end -function s.selfspcon(e,c) - if not c then return true end - local tp=c:GetControler() - return Duel.CheckReleaseGroup(tp,s.selfspcostfilter,1,false,1,true,c,tp,nil,nil,nil,tp,c) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.SelectReleaseGroup(tp,s.selfspcostfilter,1,1,false,true,true,c,tp,nil,false,nil,tp,c) - if g and #g>0 then - e:SetLabelObject(g) - return true - end - return false -end -function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) - local g=e:GetLabelObject() - if g and #g>0 then - Duel.Release(g,REASON_COST|REASON_MATERIAL) - end -end -function s.regcon(e) - local c=e:GetHandler() - return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - --You can only Special Summon "Destiny HERO - Dreadnought" once per turn this way, no matter which method you use - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCodeRule(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thfilter(c) - return ((c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster()) or c:ListsCodeWithArchetype(SET_DESTINY_HERO)) 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,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,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,2,2,nil) - if #g==2 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/c101402039.lua b/pre-release/c101402039.lua deleted file mode 100644 index a4d7fc727f..0000000000 --- a/pre-release/c101402039.lua +++ /dev/null @@ -1,148 +0,0 @@ ---鬼神 朱沙之王 ---Asutraja Susanoo ---scripted by Naim -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 Synchro Summoned: You can banish any number of Traps from your GY; banish that many cards on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - 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:SetCost(s.bancost) - e1:SetTarget(s.bantg) - e1:SetOperation(s.banop) - c:RegisterEffect(e1) - --During the End Phase: You can target up to 2 "Asutra" monsters and/or "Asutra" Traps in your GY and/or banishment; for each of them, add it to your hand or Set it, then if you targeted 2 cards, return this card to the Extra Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SET+CATEGORY_LEAVE_GRAVE+CATEGORY_TOEXTRA) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.thsettg) - e2:SetOperation(s.thsetop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ASUTRA} -function s.bancost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsTrap,Card.IsAbleToRemoveAsCost),tp,LOCATION_GRAVE,0,1,nil) end - local max_banish_count=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsTrap,Card.IsAbleToRemoveAsCost),tp,LOCATION_GRAVE,0,1,max_banish_count,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - e:GetChainData().banish_count=#g -end -function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,e:GetChainData().banish_count,PLAYER_EITHER,LOCATION_ONFIELD) -end -function s.banop(e,tp,eg,ep,ev,re,r,rp) - local banish_count=e:GetChainData().banish_count - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if #g0 - if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.setfilter(chkc,e,tp,mmz_chk) end - if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp,mmz_chk) end - local c=e:GetHandler() - local to_extra_chk=c:IsAbleToExtra() - local free_mzones=Duel.GetLocationCount(tp,LOCATION_MZONE) - local free_stzones=Duel.GetLocationCount(tp,LOCATION_SZONE) - local g=Duel.GetTargetGroup(s.setfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp,mmz_chk) - local tg=aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon(to_extra_chk,free_mzones,free_stzones),1,tp,aux.Stringid(id,2)) - Duel.SetTargetCard(tg) - Duel.SetPossibleOperationInfo(0,CATEGORY_SET,tg,#tg,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,tg,#tg,tp,0) - if tg:IsExists(Card.IsMonster,1,nil) then - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg:Filter(Card.IsMonster,nil),1,tp,0) - end - if tg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tg:Filter(Card.IsLocation,nil,LOCATION_GRAVE),1,tp,0) - end - if #tg==2 then - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) - end - e:GetChainData().number_of_targets=#tg -end -function s.thsetop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg==0 then return end - local success=false - for i=1,#tg do - local tc=nil - if #tg==2 then - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - tc=tg:Select(tp,1,1,nil):GetFirst() - Duel.HintSelection(tc) - tg:RemoveCard(tc) - else - tc=tg:GetFirst() - if i==2 then - Duel.HintSelection(tc) - end - end - local monster_set_chk=tc:IsMonster() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) - local trap_set_chk=tc:IsTrap() and tc:IsSSetable() - local success_chk=aux.ToHandOrElse(tc,tp, - function() - return monster_set_chk or trap_set_chk - end, - function() - if monster_set_chk then - if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) then - Duel.ConfirmCards(1-tp,tc) - return true - end - elseif trap_set_chk then - return Duel.SSet(tp,tc)>0 - end - end, - aux.Stringid(id,3) - ) - if tc:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(tp) end - if not success and success_chk then success=true end - end - Duel.SpecialSummonComplete() - local c=e:GetHandler() - if success and c:IsRelateToEffect(e) and e:GetChainData().number_of_targets==2 then - Duel.BreakEffect() - Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101402040.lua b/pre-release/c101402040.lua deleted file mode 100644 index 092db5cb99..0000000000 --- a/pre-release/c101402040.lua +++ /dev/null @@ -1,74 +0,0 @@ ---鬼神 水子守命 ---Asutraya Mikumari no Mikoto ---scripted by Naim -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 "Asutra" card from your Deck to the GY, and if you do, send 1 card on the field to the GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.tgtg) - e1:SetOperation(s.tgop) - c:RegisterEffect(e1) - --If your opponent activates a monster effect: You can target 1 "Asutra" Trap in your GY or banishment, or if there are 3 or more face-down cards on the field, you can target 1 Trap in your GY instead; Set it - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SET) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsMonsterEffect() - end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ASUTRA} -function s.tgfilter(c) - return c:IsSetCard(SET_ASUTRA) and c:IsAbleToGrave() -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK|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,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - if #tg>0 then - Duel.HintSelection(tg) - Duel.SendtoGrave(tg,REASON_EFFECT) - end - end -end -function s.setfilter(c,allow_any_trap) - return c:IsTrap() and c:IsFaceup() and c:IsSSetable() - and (c:IsSetCard(SET_ASUTRA) or (allow_any_trap and c:IsLocation(LOCATION_GRAVE))) -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local allow_any_trap=Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)>=3 - if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.setfilter(chkc,allow_any_trap) end - if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,allow_any_trap) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,allow_any_trap) - Duel.SetOperationInfo(0,CATEGORY_SET,g,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SSet(tp,tc) - end -end \ No newline at end of file diff --git a/pre-release/c101402041.lua b/pre-release/c101402041.lua deleted file mode 100644 index c4f3be24d7..0000000000 --- a/pre-release/c101402041.lua +++ /dev/null @@ -1,86 +0,0 @@ ---魔救の奇跡-ティアマイト ---Adamancipator Risen - Tiamite ---Scripted by Hatter -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 you have a DARK monster in your GY: You can add 1 "Adamancipator" 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_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e,tp) - return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) - end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --When your opponent activates a monster effect on the field (Quick Effect): You can excavate the top 5 cards of your Deck, and if you do, you can return cards your opponent controls to the hand, up to the number of excavated Rock monsters, also place the excavated cards on the bottom of the Deck in any order - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - 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 and Chain.IsTriggeringLocation(ev,LOCATION_MZONE) - end) - e2:SetTarget(s.excavtg) - e2:SetOperation(s.excavop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ADAMANCIPATOR} -function s.thfilter(c,e,tp) - return c:IsSetCard(SET_ADAMANCIPATOR) 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.excavtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_ONFIELD) -end -function s.excavop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end - Duel.ConfirmDecktop(tp,5) - local excavg=Duel.GetDecktopGroup(tp,5) - local excav_count=#excavg - local excav_rock_count=excavg:FilterCount(Card.IsRace,nil,RACE_ROCK) - local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil) - if excav_rock_count>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - local return_count=math.min(#g,excav_rock_count) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local sg=g:Select(tp,1,return_count,nil) - if #sg>0 then - Duel.HintSelection(sg) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - local og=Duel.GetOperatedGroup():Match(Card.IsLocation,nil,LOCATION_HAND) - if #og>0 then - if og:IsExists(Card.IsControler,1,nil,tp) then - Duel.ShuffleHand(tp) - end - if og:IsExists(Card.IsControler,1,nil,1-tp) then - Duel.ShuffleHand(1-tp) - end - end - end - end - if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>excav_count then - Duel.MoveToDeckBottom(excav_count,tp) - end - Duel.SortDeckbottom(tp,tp,excav_count) -end \ No newline at end of file diff --git a/pre-release/c101402045.lua b/pre-release/c101402045.lua deleted file mode 100644 index 86c7ae1ae9..0000000000 --- a/pre-release/c101402045.lua +++ /dev/null @@ -1,70 +0,0 @@ ---燦冠乗騎シックラヴィー ---Swickelavee the Brilliantly Crowned Heavy Cavalry ---scripted by Naim -local s,id=GetID() -local COUNTER_CROWN=0x21c -function s.initial_effect(c) - c:EnableReviveLimit() - c:EnableCounterPermit(COUNTER_CROWN) - --Xyz Summon procedure: 2 Level 3 monsters, OR, once per turn, you can also Xyz Summon "Swickelavee the Brilliantly Crowned Heavy Cavalry" by using 1 Beast monster you control with 2000 or less ATK - Xyz.AddProcedure(c,nil,3,2,s.altxyzmat,aux.Stringid(id,0),2,s.altxyzop) - --Cannot be used as material for an Xyz Summon - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) - e0:SetValue(1) - c:RegisterEffect(e0) - --If this card destroys a monster by battle: Place 1 Crown Counter on it, then apply this effect based on the number of Crown Counters on it - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_COUNTER+CATEGORY_ATKCHANGE+CATEGORY_TOEXTRA+CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(function(e) - return e:GetHandler():IsRelateToBattle() - end) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -s.listed_names={id} -s.counter_place_list={COUNTER_CROWN} -function s.altxyzmat(c,tp,xyz) - return c:IsRace(RACE_BEAST,xyz,SUMMON_TYPE_XYZ,tp) and c:IsAttackBelow(2000) and c:IsFaceup() -end -function s.altxyzop(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.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local c=e:GetHandler() - local crown_counters=c:GetCounter(COUNTER_CROWN) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,1,tp,COUNTER_CROWN) - if crown_counters<3 then - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,crown_counters==1 and 400 or 600) - end - if crown_counters==2 then - Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,3) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:AddCounter(COUNTER_CROWN,1) then - local crown_counters=c:GetCounter(COUNTER_CROWN) - if crown_counters==1 then - --● 1: This card gains 400 ATK - c:UpdateAttack(400) - elseif crown_counters==2 then - --● 2: This card gains 600 ATK - c:UpdateAttack(600) - elseif crown_counters==3 then - --● 3: Return this card to the Extra Deck, and if you do, draw 3 cards - if Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and c:IsLocation(LOCATION_EXTRA) then - Duel.Draw(tp,3,REASON_EFFECT) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101402046.lua b/pre-release/c101402046.lua deleted file mode 100644 index aa9d77934d..0000000000 --- a/pre-release/c101402046.lua +++ /dev/null @@ -1,115 +0,0 @@ ---蒼海竜神-ネオダイダロス・レイジ ---Blue Ocean Dragon Lord - Neo Daedalus Rage ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 4 monsters - Link.AddProcedure(c,nil,4,4) - --Additional prcedure for "Atlantis, the Dragon City" - Link.AddProcedure(c,nil,3,3,nil,aux.Stringid(CARD_ATLANTIS_THE_DRAGON_CITY,0),s.splimit) - --If this card is Link Summoned: You can Special Summon up to 3 monsters that mention "Atlantis, the Dragon City" from your GY to your zones this card points to, also you cannot Special Summon for the rest of this turn - 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:SetCondition(function(e) - return e:GetHandler():IsLinkSummoned() - end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --This card's name becomes "Umi" while in the Monster Zone - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(CARD_UMI) - c:RegisterEffect(e2) - --Once per turn (Quick Effect): You can send 1 face-up "Umi" you control to the GY; send all cards on the field to the GY, except "Umi" - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOGRAVE) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1) - e3:SetCost(s.tgcost) - e3:SetTarget(s.tgtg) - e3:SetOperation(s.tgop) - e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e3) -end -s.listed_names={CARD_ATLANTIS_THE_DRAGON_CITY,CARD_UMI} -function s.splimit(e,se,sp,st) - if Duel.IsPlayerAffectedByEffect(sp,CARD_ATLANTIS_THE_DRAGON_CITY) then - local c=e:GetHandler() - c:AssumeProperty(ASSUME_LINK,c:GetLink()-1) - return true - end - return false -end -function s.spfilter(c,e,tp,zone) - return c:ListsCode(CARD_ATLANTIS_THE_DRAGON_CITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local zone=e:GetHandler():GetFreeLinkedZone() - if chk==0 then return zone>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) 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 c=e:GetHandler() - local zone=c:GetFreeLinkedZone() - if c:IsRelateToEffect(e) and zone>0 then - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp,zone) - local znct=0 - --This is basically a popcount algorithm used here to count how many zones are among the 'zone' variable - for i=0,4 do - if zone&(1<0 then - znct=znct+1 - end - end - local ct=math.min(3,#g,znct) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and ct>1 then ct=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=g:Select(tp,1,ct,nil) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP,zone) - end - end - --You cannot Special Summon for the rest of this turn - 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:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.tgcostfilter(c) - return c:IsCode(CARD_UMI) and c:IsFaceup() and c:IsAbleToGraveAsCost() -end -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.tgfilter(c) - return not (c:IsCode(CARD_UMI) and c:IsFaceup()) and c:IsAbleToGrave() -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,tp,0) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101402047.lua b/pre-release/c101402047.lua deleted file mode 100644 index a3f1ddef4f..0000000000 --- a/pre-release/c101402047.lua +++ /dev/null @@ -1,99 +0,0 @@ ---真海竜騎-ダイダロス ---Levia-Dragoon - Daedalus ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 3 WATER monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WATER),3,3) - --Additional prcedure for "Atlantis, the Dragon City" - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WATER),2,2,nil,aux.Stringid(CARD_ATLANTIS_THE_DRAGON_CITY,0),s.splimit) - --This card's name becomes "Umi" while in the Monster Zone - 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) - e1:SetValue(CARD_UMI) - c:RegisterEffect(e1) - --If this card is Link Summoned: You can Special Summon 1 monster that mentions "Atlantis, the Dragon City" from your Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - 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():IsLinkSummoned() - end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --During the Main Phase (Quick Effect): You can send 1 face-up "Umi" you control to the GY; discard your opponent's entire hand, and if you do, they draw the same number of cards. Neither player can activate cards or effects in response to this effect's activation - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW) - e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function() - return Duel.IsMainPhase() - end) - e3:SetCost(s.discardcost) - e3:SetTarget(s.discardtg) - e3:SetOperation(s.discardop) - e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - c:RegisterEffect(e3) -end -s.listed_names={CARD_UMI,CARD_ATLANTIS_THE_DRAGON_CITY} -function s.splimit(e,se,sp,st) - if Duel.IsPlayerAffectedByEffect(sp,CARD_ATLANTIS_THE_DRAGON_CITY) then - local c=e:GetHandler() - c:AssumeProperty(ASSUME_LINK,c:GetLink()-1) - return true - end - return false -end -function s.spfilter(c,e,tp) - return c:ListsCode(CARD_ATLANTIS_THE_DRAGON_CITY) 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,chk) - 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.discardcostfilter(c) - return c:IsCode(CARD_UMI) and c:IsFaceup() and c:IsAbleToGraveAsCost() -end -function s.discardcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.discardcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.discardcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.discardtg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - local ct=#g - if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(1-tp,ct) end - Duel.SetOperationInfo(0,CATEGORY_HANDES,g,ct,1-tp,ct) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,ct) - Duel.SetChainLimit(aux.FALSE) -end -function s.discardop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if #g>0 then - local ct=Duel.SendtoGrave(g,REASON_DISCARD|REASON_EFFECT) - if ct==0 then return end - Duel.Draw(1-tp,ct,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101402049.lua b/pre-release/c101402049.lua deleted file mode 100644 index eea8eec6eb..0000000000 --- a/pre-release/c101402049.lua +++ /dev/null @@ -1,82 +0,0 @@ ---魔救の輝跡 ---Adamancipator Luminous ---scripted by Naim -local s,id=GetID() -local TOKEN_GLIMMER=id+100 -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 Effect Monsters, including a Synchro Monster - Link.AddProcedure(c,nil,2,2,s.linkmatcheck) - --If this card is Link Summoned, or a monster(s) is Special Summoned to a zone(s) this card points to: You can target 1 monster in your field or GY that has a Level; Special Summon 1 "Glimmer Token" (Rock/LIGHT/ATK 0/DEF 0) with the same Level - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1a:SetCode(EVENT_SPSUMMON_SUCCESS) - e1a:SetCountLimit(1,{id,0}) - e1a:SetCondition(function(e) - return e:GetHandler():IsLinkSummoned() - end) - e1a:SetTarget(s.tkntg) - e1a:SetOperation(s.tknop) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1b:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1b:SetRange(LOCATION_MZONE) - e1b:SetCondition(aux.zptcon(nil)) - c:RegisterEffect(e1b) - --When another monster on the field activates its effect (Quick Effect): You can place it on top of the Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.tdcon) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ADAMANCIPATOR} -function s.linkmatcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO,lc,sumtype,tp) -end -function s.tgfilter(c,e,tp) - return c:IsFaceup() and c:HasLevel() - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_GLIMMER,0,TYPES_TOKEN,0,0,c:GetLevel(),RACE_ROCK,ATTRIBUTE_LIGHT) -end -function s.tkntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.tgfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) -end -function s.tknop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_GLIMMER,0,TYPES_TOKEN,0,0,tc:GetLevel(),RACE_ROCK,ATTRIBUTE_LIGHT) then - local token=Duel.CreateToken(tp,TOKEN_GLIMMER) - token:Level(tc:GetLevel()) - Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsMonsterEffect() and re:GetHandler()~=e:GetHandler() and Chain.IsTriggeringLocation(ev,LOCATION_MZONE) -end -function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - local rc=re:GetHandler() - if chk==0 then return rc:IsRelateToEffect(re) and rc:IsAbleToDeck() end - Duel.SetOperationInfo(0,CATEGORY_TODECK,rc,1,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if rc:IsRelateToEffect(re) then - Duel.SendtoDeck(rc,nil,SEQ_DECKTOP,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101402050.lua b/pre-release/c101402050.lua deleted file mode 100644 index 04c0aa06c1..0000000000 --- a/pre-release/c101402050.lua +++ /dev/null @@ -1,93 +0,0 @@ ---海中戦型お手伝いロボ ---Helping Robo for Underwater Combat ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 Machine monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),2) - --If this card is Link Summoned: You can target 1 monster your opponent controls; destroy it, also this card, then you can Special Summon 1 non-WATER Machine monster with 1600 or less ATK from your GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - 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 e:GetHandler():IsLinkSummoned() - end) - e1:SetCost(s.effcost) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --If this card is banished: You can add 1 Machine monster whose ATK equals its own DEF 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_REMOVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.effcost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsRace(RACE_MACHINE) end) -end -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 Machine 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_MACHINE) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g+e:GetHandler(),2,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) -end -function s.spfilter(c,e,tp) - return c:IsAttributeExcept(ATTRIBUTE_WATER) and c:IsRace(RACE_MACHINE) and c:IsAttackBelow(1600) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - local dg=Group.FromCards(c,tc):Match(Card.IsRelateToEffect,nil,e) - if #dg>0 and Duel.Destroy(dg,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),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 -function s.thfilter(c) - return c:IsRace(RACE_MACHINE) and c:IsDefense(c:GetAttack()) and c:IsAttackAbove(0) and c:IsDefenseAbove(0) - 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/c101402051.lua b/pre-release/c101402051.lua deleted file mode 100644 index 15ee9b0278..0000000000 --- a/pre-release/c101402051.lua +++ /dev/null @@ -1,86 +0,0 @@ ---解層竜ストラティアエ ---Destratification Dino Stratiae ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 monsters, including a Dinosaur monster - Link.AddProcedure(c,nil,2,2,s.linkmatcheck) - --Keep track of the total original ATK of the Dinosaur monsters used as its material - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetCode(EFFECT_MATERIAL_CHECK) - e0:SetValue(function(e,c) - local mg=c:GetMaterial():Match(Card.IsRace,nil,RACE_DINOSAUR,c,SUMMON_TYPE_LINK,e:GetHandlerPlayer()) - e:SetLabel(mg:GetSum(Card.GetBaseAttack)//2) - end) - c:RegisterEffect(e0) - --If this card is Link Summoned: You can make this card gain ATK equal to half the total original ATK of the Dinosaur monsters used as its material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - 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():IsLinkSummoned() and e0:GetLabel()>0 - end) - e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local atk=e0:GetLabel() - e:GetChainData().atk=atk - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,atk) - end) - e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - --Make this card gain ATK equal to half the total original ATK of the Dinosaur monsters used as its material - c:UpdateAttack(e:GetChainData().atk) - end - end) - c:RegisterEffect(e1) - --During your Main Phase: You can Fusion Summon 1 Dinosaur Fusion Monster from your Extra Deck, by banishing its materials from your field and/or GY, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Dinosaur monsters. You can only use this effect of "Destratification Dino Stratiae" once per turn - local fusion_params={ - fusfilter=function(c) return c:IsRace(RACE_DINOSAUR) end, - matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove), - extrafil=function(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) - end - return nil - end, - extraop=Fusion.BanishMaterial, - extratg=function(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE|LOCATION_GRAVE) - end, - stage2=function(e,fc,tp,mg,chk) - if chk~=2 then return end - local c=e:GetHandler() - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Dinosaur 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:IsRaceExcept(RACE_DINOSAUR) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(c) return not c:IsOriginalRace(RACE_DINOSAUR) end) - end - } - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(Fusion.SummonEffTG(fusion_params)) - e2:SetOperation(Fusion.SummonEffOP(fusion_params)) - c:RegisterEffect(e2) -end -function s.linkmatcheck(g,linkc,sumtype,tp) - return g:IsExists(Card.IsRace,1,nil,RACE_DINOSAUR,linkc,sumtype,tp) -end \ No newline at end of file diff --git a/pre-release/c101402052.lua b/pre-release/c101402052.lua deleted file mode 100644 index 934a7d36e0..0000000000 --- a/pre-release/c101402052.lua +++ /dev/null @@ -1,94 +0,0 @@ ---時の黒魔術師 ---Dark Time Wizard ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Activate 1 of these effects (but you can only use each effect of "Dark Time Wizard" 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:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(TIMING_END_PHASE,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -s.listed_names={id} -s.toss_coin=true -function s.deckthfilter(c) - return c:ListsCode(id) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - --● Add 1 card that mentions "Dark Time Wizard" from your Deck to your hand, except "Dark Time Wizard", also add 1 "Dark Time Wizard" from your GY to your hand during the End Phase of this turn - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) - --● Toss a coin and call it. If you call it right, destroy as many monsters your opponent controls as possible, and if you do, inflict damage to your opponent equal to half the total original ATK of those monsters. If you call it wrong, destroy all monsters you control - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) - local b2=not Duel.HasFlagEffect(tp,id+100) and #g>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 - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) - else - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_COIN+CATEGORY_DESTROY+CATEGORY_DAMAGE) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,1,1-tp,0) - end -end -function s.gythfilter(c) - return c:IsCode(id) and c:IsAbleToHand() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --● Add 1 card that mentions "Dark Time Wizard" from your Deck to your hand, except "Dark Time Wizard", also add 1 "Dark Time Wizard" from your GY to your hand during the End Phase of this turn - 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 - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) - --Add 1 "Dark Time Wizard" from your GY to your hand during the End Phase of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetCountLimit(1) - e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,id) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.gythfilter),tp,LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end - end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - elseif op==2 then - --● Toss a coin and call it. If you call it right, destroy as many monsters your opponent controls as possible, and if you do, inflict damage to your opponent equal to half the total original ATK of those monsters. If you call it wrong, destroy all monsters you control - if Duel.CallCoin(tp) then - local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then - local dam=Duel.GetOperatedGroup():GetSum(Card.GetBaseAttack) - if dam>0 then - Duel.Damage(1-tp,dam/2,REASON_EFFECT) - end - end - else - local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c101402053.lua b/pre-release/c101402053.lua deleted file mode 100644 index 32bbebcccc..0000000000 --- a/pre-release/c101402053.lua +++ /dev/null @@ -1,121 +0,0 @@ ---天使と悪魔のサイコロ ---Graceful Skull Dice ---Scripted by Eerie Code -local s,id=GetID() -function s.initial_effect(c) - --Roll a six-sided die twice and apply these effects for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DICE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - c:RegisterEffect(e1) - local g=Group.CreateGroup() - --If your opponent Normal or Special Summons a monster(s) while this card is in your GY: You can banish this card, then target 1 of those monsters; roll a six-sided die twice, and if the total is 6 or more, destroy that monster - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_DICE+CATEGORY_DESTROY) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2a:SetCode(EVENT_CUSTOM+id) - e2a:SetRange(LOCATION_GRAVE) - e2a:SetCost(Cost.SelfBanish) - e2a:SetTarget(s.destg) - e2a:SetOperation(s.desop) - e2a:SetLabelObject(g) - c:RegisterEffect(e2a) - --Keep track of monsters the opponent Normal or Special Summons - local e2b=Effect.CreateEffect(c) - e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2b:SetCode(EVENT_SUMMON_SUCCESS) - e2b:SetRange(LOCATION_GRAVE) - e2b:SetLabelObject(e2a) - e2b:SetOperation(s.regop) - c:RegisterEffect(e2b) - local e2c=e2b:Clone() - e2c:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2c) -end -s.listed_names={CARD_DARK_TIME_WIZARD} -s.roll_dice=true -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,2) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local d1,d2=Duel.TossDice(tp,2) - local total_atkdef=(d1+d2)*200 - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) - --● Monsters you control that mention "Dark Time Wizard" gain ATK/DEF equal to the total x 200 - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_FIELD) - e1a:SetCode(EFFECT_UPDATE_ATTACK) - e1a:SetTargetRange(LOCATION_MZONE,0) - e1a:SetTarget(function(e,c) return c:ListsCode(CARD_DARK_TIME_WIZARD) end) - e1a:SetValue(total_atkdef) - e1a:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1a,tp) - local e1b=e1a:Clone() - e1b:SetCode(EFFECT_UPDATE_DEFENSE) - Duel.RegisterEffect(e1b,tp) - aux.RegisterClientHint(c,nil,tp,0,1,aux.Stringid(id,3)) - --● Monsters your opponent controls lose ATK/DEF equal to the total x 200 - local e2a=e1a:Clone() - e2a:SetTargetRange(0,LOCATION_MZONE) - e2a:SetTarget(aux.TRUE) - e2a:SetValue(-total_atkdef) - Duel.RegisterEffect(e2a,tp) - local e2b=e2a:Clone() - e2b:SetCode(EFFECT_UPDATE_DEFENSE) - Duel.RegisterEffect(e2b,tp) -end -function s.desfilter(c,e,opp) - return c:IsSummonPlayer(opp) and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_MZONE) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsDamageStep() then return end - local tg=eg:Filter(s.desfilter,nil,e,1-tp) - if #tg>0 then - for tc in tg:Iter() do - tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) - end - local g=e:GetLabelObject():GetLabelObject() - if Duel.GetCurrentChain()==0 then g:Clear() end - g:Merge(tg) - g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) - e:GetLabelObject():SetLabelObject(g) - Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local opp=1-tp - local g=e:GetLabelObject():Filter(s.desfilter,nil,e,opp) - if chkc then return g:IsContains(chkc) and s.desfilter(chkc,e,opp) end - if chk==0 then return #g>0 end - local tc=nil - if #g>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - tc=g:Select(tp,1,1,nil):GetFirst() - else - tc=g:GetFirst() - end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,2) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - local d1,d2=Duel.TossDice(tp,2) - if d1+d2>=6 then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101402054.lua b/pre-release/c101402054.lua deleted file mode 100644 index 762e4d4c9d..0000000000 --- a/pre-release/c101402054.lua +++ /dev/null @@ -1,110 +0,0 @@ ---眠れる羊 スケープ・ゴート ---Sleeping Scapegoats ---scripted by pyrQ -local s,id=GetID() -local TOKEN_SCAPEGOAT=id+100 -function s.initial_effect(c) - --Special Summon up to 4 "Scapegoat Tokens" (Beast/EARTH/Level 1/ATK 0/DEF 0) in Defense Position, then if your opponent controls a monster, you can Special Summon 1 "Swift Panther Warrior" from your Deck, also for the rest of this turn, these Tokens cannot be Tributed for a Tribute Summon, also you cannot Special Summon from the Extra Deck, except Fusion Monsters. If a card(s) you control that mentions "Dark Time Wizard" would be destroyed by battle or card effect, you can destroy 1 Token you control that was Special Summoned by this effect instead - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - 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) -end -s.listed_names={TOKEN_SCAPEGOAT,101402001,CARD_DARK_TIME_WIZARD} --"Swift Panther Warrior" -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SCAPEGOAT,0,TYPES_TOKEN,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) end - Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.spfilter(c,e,tp) - return c:IsCode(101402001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local mmz_count=Duel.GetLocationCount(tp,LOCATION_MZONE) - if mmz_count>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SCAPEGOAT,0,TYPES_TOKEN,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) then - mmz_count=math.min(mmz_count,4) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then mmz_count=1 end - if mmz_count>1 then - mmz_count=Duel.AnnounceNumberRange(tp,1,mmz_count) - end - end - local c=e:GetHandler() - for i=1,mmz_count do - local token=Duel.CreateToken(tp,TOKEN_SCAPEGOAT) - if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then - --For the rest of this turn, these Tokens cannot be Tributed for a Tribute Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(3304) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetValue(1) - e1:SetReset(RESETS_STANDARD_PHASE_END) - token:RegisterEffect(e1,true) - end - end - if Duel.SpecialSummonComplete()>0 then - --If a card(s) you control that mentions "Dark Time Wizard" would be destroyed by battle or card effect, you can destroy 1 Token you control that was Special Summoned by this effect instead - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetTarget(s.reptg) - e2:SetOperation(s.repop) - e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) - Duel.RegisterEffect(e2,tp) - if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and 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,1)) 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.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - end - --You cannot Special Summon from the Extra Deck, except Fusion Monsters - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetTargetRange(1,0) - e3:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsFusionMonster() end) - e3:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e3,tp) -end -function s.repfilter(c,tp) - return c:ListsCode(CARD_DARK_TIME_WIZARD) and c:IsOnField() and c:IsControler(tp) and c:IsFaceup() - and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) -end -function s.desfilter(c,e,tp) - return c:IsOriginalCode(TOKEN_SCAPEGOAT) and c:IsOwner(tp) and c:IsDestructable(e) - and not c:IsStatus(STATUS_DESTROY_CONFIRMED|STATUS_BATTLE_DESTROYED) -end -function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) - and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end - if Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - Duel.Hint(HINT_CARD,0,id) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local sc=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() - Duel.HintSelection(sc) - e:SetLabelObject(sc) - sc:SetStatus(STATUS_DESTROY_CONFIRMED,true) - return true - end - return false -end -function s.repop(e,tp,eg,ep,ev,re,r,rp) - local sc=e:GetLabelObject() - sc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(sc,REASON_EFFECT|REASON_REPLACE) -end \ No newline at end of file diff --git a/pre-release/c101402057.lua b/pre-release/c101402057.lua deleted file mode 100644 index 0cada4629e..0000000000 --- a/pre-release/c101402057.lua +++ /dev/null @@ -1,100 +0,0 @@ ---艮神鬼門 三千世界 ---Asutrashen Trichiliocosm ---scripted by Naim -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 target any number of face-down cards you control; add "Asutra" cards from your Deck to your hand with different names from each other, except Field Spells, equal to the number of those targeted cards that are still face-down, then send those face-down cards to the GY - 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:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_FZONE) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --If a card(s) becomes Set on the field, while you control an "Asutra" monster and a face-down card: You can target 1 card on the field; return it to the hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND) - e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2a:SetCode(EVENT_MSET) - e2a:SetRange(LOCATION_FZONE) - e2a:SetCountLimit(1,{id,1}) - e2a:SetCondition(s.rthcon) - e2a:SetTarget(s.rthtg) - e2a:SetOperation(s.rthop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - e2b:SetCondition(aux.AND(s.spsuccesscon,s.rthcon)) - c:RegisterEffect(e2b) - local e2c=e2a:Clone() - e2c:SetCode(EVENT_SSET) - c:RegisterEffect(e2c) - local e2d=e2a:Clone() - e2d:SetCode(EVENT_CHANGE_POS) - e2d:SetCondition(aux.AND(s.changeposcon,s.rthcon)) - c:RegisterEffect(e2d) -end -s.listed_series={SET_ASUTRA} -function s.thfilter(c) - return c:IsSetCard(SET_ASUTRA) and not c:IsFieldSpell() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local search_group=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if chk==0 then return #search_group>0 and Duel.IsExistingTarget(aux.AND(Card.IsFacedown,Card.IsAbleToGrave),tp,LOCATION_ONFIELD,0,1,nil) end - local max_target_count=search_group:GetClassCount(Card.GetCode) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,aux.AND(Card.IsFacedown,Card.IsAbleToGrave),tp,LOCATION_ONFIELD,0,1,max_target_count,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,#g,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e):Match(Card.IsFacedown,nil) - local face_down_count=#tg - if face_down_count>0 then - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if g:GetClassCount(Card.GetCode)0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - Duel.ShuffleDeck(tp) - if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_ATLANTIS_THE_DRAGON_CITY),tp,LOCATION_ONFIELD,0,1,nil) - and Duel.IsExistingMatchingCard(aux.AND(Card.IsEffectMonster,Card.IsNegatableMonster),tp,0,LOCATION_MZONE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local sc=Duel.SelectMatchingCard(tp,aux.AND(Card.IsEffectMonster,Card.IsNegatableMonster),tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - if not sc then return end - Duel.HintSelection(sc) - Duel.BreakEffect() - --Negate the effects of 1 Effect Monster your opponent controls until the end of this turn - sc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) - end - end -end \ No newline at end of file diff --git a/pre-release/c101402060.lua b/pre-release/c101402060.lua deleted file mode 100644 index 34440c2456..0000000000 --- a/pre-release/c101402060.lua +++ /dev/null @@ -1,68 +0,0 @@ ---顕現する伝説の都 ---Atlantis Advent ---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) - --This card's name becomes "Umi" while in the Spell & Trap Zone - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_SZONE) - e1:SetValue(CARD_UMI) - c:RegisterEffect(e1) - --During your Main Phase: You can place 1 "Atlantis, the Dragon City" or "Umi" from your Deck face-up in your Field Zone - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetTarget(s.pltg) - e2:SetOperation(s.plop) - c:RegisterEffect(e2) - --If this card is sent to the GY: You can add 1 Level 7 Sea Serpent 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_TO_GRAVE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.thtg) - e3:SetOperation(s.thop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_UMI,CARD_ATLANTIS_THE_DRAGON_CITY} -function s.plfilter(c,tp) - return c:IsCode(CARD_ATLANTIS_THE_DRAGON_CITY,CARD_UMI) and c:IsFieldSpell() and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) end -end -function s.plop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - if sc then - Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) - end -end -function s.thfilter(c) - return c:IsLevel(7) and c:IsRace(RACE_SEASERPENT) 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/c101402062.lua b/pre-release/c101402062.lua deleted file mode 100644 index e69fe6f5c6..0000000000 --- a/pre-release/c101402062.lua +++ /dev/null @@ -1,96 +0,0 @@ ---幽獄の時計都市-ダーク・シティ ---Clock Tower Prison City - Dark City ---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) - e0:SetCost(s.actreg) - c:RegisterEffect(e0) - --Each time you Special Summon a Level 8 or higher "Destiny HERO" monster(s): All Warrior monsters you currently control gain 300 ATK - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_FZONE) - e1:SetCondition(s.atkcon) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --During your Main Phase, if this card was activated this turn: You can add 1 "Destiny HERO" monster, or 1 card that mentions a "Destiny HERO" monster's card name, 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_IGNITION) - e2:SetRange(LOCATION_FZONE) - e2:SetCountLimit(1,{id,0}) - e2:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --If this card is destroyed: You can Special Summon 1 "Destiny HERO" monster from your Deck (this is treated as a Special Summon with "Clock Tower Prison") - 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) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_series={SET_DESTINY_HERO} -s.listed_names={75041269} --"Clock Tower Prison" -function s.actreg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.atkconfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsLevelAbove(8) and c:IsSetCard(SET_DESTINY_HERO) and c:IsFaceup() -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.atkconfilter,1,nil,tp) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_WARRIOR),tp,LOCATION_MZONE,0,nil) - if #g==0 then return end - local c=e:GetHandler() - for tc in g:Iter() do - --All Warrior monsters you currently control gain 300 ATK - tc:UpdateAttack(300,nil,c) - end -end -function s.thfilter(c) - return ((c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster()) or c:ListsCodeWithArchetype(SET_DESTINY_HERO)) 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) - return c:IsSetCard(SET_DESTINY_HERO) 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 \ No newline at end of file diff --git a/pre-release/c101402063.lua b/pre-release/c101402063.lua deleted file mode 100644 index 6dd56ac082..0000000000 --- a/pre-release/c101402063.lua +++ /dev/null @@ -1,60 +0,0 @@ ---魔救の合緑 ---Adamancipator Mates ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Adamancipator" 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_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,{id,0}) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --If this card is in your GY: You can place 1 card from your hand on top of the Deck; add this card to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.thcost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ADAMANCIPATOR} -function s.thfilter(c) - return c:IsSetCard(SET_ADAMANCIPATOR) and c:IsMonster() 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) -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 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_COST) -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/c101402068.lua b/pre-release/c101402068.lua deleted file mode 100644 index 8676c11236..0000000000 --- a/pre-release/c101402068.lua +++ /dev/null @@ -1,49 +0,0 @@ ---宇宙的ハリケーン ---Spatial Trunade ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Return up to 2 cards on the field to the hand, then each player places cards from their hand on the bottom of the Deck in any order equal to the number returned to their hand. You can only activate 1 "Spatial Trunade" per turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_EITHER,LOCATION_HAND) -end -function s.thop(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_RTOHAND) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,exc) - if #g==0 then return end - Duel.HintSelection(g) - if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and #g:Match(Card.IsLocation,nil,LOCATION_HAND)>0 then - local ct=g:FilterCount(Card.IsControler,nil,tp) - if ct>0 then Duel.ShuffleHand(tp) end - if #g>ct then Duel.ShuffleHand(1-tp) end - Duel.BreakEffect() - s.place_on_deck_bottom(tp,ct) - s.place_on_deck_bottom(1-tp,#g-ct) - end -end -function s.place_on_deck_bottom(p,ct) - if ct==0 then return end - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil) - if #g1 then - Duel.SortDeckbottom(p,p,sort_ct) - end -end \ No newline at end of file diff --git a/pre-release/c101402070.lua b/pre-release/c101402070.lua deleted file mode 100644 index 92c68039fa..0000000000 --- a/pre-release/c101402070.lua +++ /dev/null @@ -1,68 +0,0 @@ ---おろかな墓荒らし ---Foolish Graverobber ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Send 1 card that mentions "Dark Time Wizard" from your Deck to the GY, except "Foolish Graverobber", then you can Special Summon 1 monster from either GY to your field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE+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(TIMING_END_PHASE,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) - --You can banish this card from your GY; Set to your field, 1 Spell/Trap that mentions "Dark Time Wizard" from your GY, except "Foolish Graverobber", or 1 Spell/Trap from your opponent's GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SET) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - e2:SetHintTiming(TIMING_END_PHASE,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_names={CARD_DARK_TIME_WIZARD,id} -function s.tgfilter(c) - return c:ListsCode(CARD_DARK_TIME_WIZARD) and not c:IsCode(id) 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,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_EITHER,LOCATION_GRAVE) -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,0,1,1,nil):GetFirst() - if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(Card.IsCanBeSpecialSummoned),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,0,tp,false,false) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsCanBeSpecialSummoned),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false) - if #g>0 then - Duel.BreakEffect() - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function s.setfilter(c,opp) - return c:IsSpellTrap() and c:IsSSetable() and ((c:ListsCode(CARD_DARK_TIME_WIZARD) and not c:IsCode(id)) or c:IsControler(opp)) -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,LOCATION_GRAVE,1,nil,1-tp) end - Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,PLAYER_EITHER,LOCATION_GRAVE) -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,LOCATION_GRAVE,1,1,nil,1-tp) - if #g>0 then - Duel.HintSelection(g) - Duel.SSet(tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101402071.lua b/pre-release/c101402071.lua deleted file mode 100644 index 8cf6e6536d..0000000000 --- a/pre-release/c101402071.lua +++ /dev/null @@ -1,98 +0,0 @@ ---大逆転BOX ---Reversal Box ---scripted by pyrQ -local s,id=GetID() -local COUNTER_REVERSAL_BOX=0x21b -function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_REVERSAL_BOX) - c:SetCounterLimit(COUNTER_REVERSAL_BOX,6) - --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: Roll a six-sided die and place counters on this card equal to the result (max. 6) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DICE+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:SetTarget(s.countertg) - e1:SetOperation(s.counterop) - c:RegisterEffect(e1) - --When a monster effect is activated on your opponent's field, or once per battle, during damage calculation, if an opponent's monster attacks: You can remove 1 counter from this card, then target 1 of those monsters; toss a coin and call it. If you call it right, you can Special Summon 1 monster that mentions "Dark Time Wizard" from your Deck, and if you do, until the end of this turn, change the targeted monster's ATK to 0, also its effects are negated - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_COIN+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DISABLE) - e2a:SetType(EFFECT_TYPE_QUICK_O) - e2a:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2a:SetCode(EVENT_CHAINING) - e2a:SetRange(LOCATION_SZONE) - e2a:SetCondition(s.coincon) - e2a:SetCost(Cost.RemoveCounterFromSelf(COUNTER_REVERSAL_BOX,1)) - e2a:SetTarget(s.cointg) - e2a:SetOperation(s.coinop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e2b:SetCondition(function(e,tp,eg) return Duel.GetAttacker():IsControler(1-tp) end) - e2b:SetCost(Cost.AND(Cost.RemoveCounterFromSelf(COUNTER_REVERSAL_BOX,1),Cost.SoftOncePerBattle(id))) - c:RegisterEffect(e2b) -end -s.listed_names={CARD_DARK_TIME_WIZARD} -s.roll_dice=true -s.toss_coin=true -function s.countertg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,tp,COUNTER_REVERSAL_BOX) -end -function s.counterop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local die_roll=Duel.TossDice(tp,1) - c:AddCounter(COUNTER_REVERSAL_BOX,die_roll,true) - end -end -function s.coincon(e,tp,eg,ep,ev,re,r,rp) - local trig_loc,trig_ctrl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_CONTROLER) - return re:IsMonsterEffect() and trig_ctrl==1-tp and trig_loc==LOCATION_MZONE and re:GetHandler():IsRelateToEffect(re) -end -function s.cointg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local opp_card=e:GetCode()==EVENT_CHAINING and eg:GetFirst() or Duel.GetAttacker() - if chk==0 then return opp_card:IsCanBeEffectTarget(e) end - Duel.SetTargetCard(opp_card) - Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,opp_card,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,opp_card,1,tp,0) -end -function s.spfilter(c,e,tp) - return c:ListsCode(CARD_DARK_TIME_WIZARD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.coinop(e,tp,eg,ep,ev,re,r,rp) - if Duel.CallCoin(tp) and 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 - local tc=Duel.GetFirstTarget() - 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 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 - and tc:IsRelateToEffect(e) and tc:IsFaceup() then - local c=e:GetHandler() - --Until the end of this turn, change the targeted monster's ATK to 0 - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_SET_ATTACK) - e1:SetValue(0) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - --Also its effects are negated - tc:NegateEffects(c,RESET_PHASE|PHASE_END) - end - end -end \ No newline at end of file diff --git a/pre-release/c101402073.lua b/pre-release/c101402073.lua deleted file mode 100644 index e0061df8db..0000000000 --- a/pre-release/c101402073.lua +++ /dev/null @@ -1,72 +0,0 @@ ---色鬼の蟲毒 ---Asutra Insect Poison ---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:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -s.listed_series={SET_ASUTRA} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ASUTRA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -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.spfilter(chkc,e,tp) end - local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - --● Special Summon this card as a Normal Monster (Insect/Tuner/DARK/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster - local b1=mmz_chk and e:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ASUTRA,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_INSECT,ATTRIBUTE_DARK) - --● Target 1 "Asutra" monster in your GY; Special Summon it - local b2=mmz_chk and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - if chk==0 then return b1 or b2 end - local cd=e:GetChainData() - cd.choice=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - if cd.choice==1 then - --● Special Summon this card as a Normal Monster (Insect/Tuner/DARK/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster - e:SetProperty(0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - elseif cd.choice==2 then - --● Target 1 "Asutra" monster in your GY; Special Summon it - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local cd=e:GetChainData() - if cd.choice==1 then - --● Special Summon this card as a Normal Monster (Insect/Tuner/DARK/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ASUTRA,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_INSECT,ATTRIBUTE_DARK) then - c:AddMonsterAttribute(TYPE_NORMAL|TYPE_TUNER) - Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) - c:AddMonsterAttributeComplete() - end - if Duel.SpecialSummonComplete()==0 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 - elseif cd.choice==2 then - --● Target 1 "Asutra" monster in your GY; Special Summon it - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c101402074.lua b/pre-release/c101402074.lua deleted file mode 100644 index 463948121b..0000000000 --- a/pre-release/c101402074.lua +++ /dev/null @@ -1,73 +0,0 @@ ---依鬼の呪咆 ---Asutra Cursed Roar ---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:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -s.listed_series={SET_ASUTRA} -function s.desconfilter(c) - return c:IsSetCard(SET_ASUTRA) and c:IsMonster() and c:IsFaceup() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end - --● Special Summon this card as a Normal Monster (Spellcaster/Tuner/DARK/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ASUTRA,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_SPELLCASTER,ATTRIBUTE_DARK) - --● If you have an "Asutra" monster in your field or GY: Target 1 monster your opponent controls; destroy it - local b2=Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) - if chk==0 then return b1 or b2 end - local cd=e:GetChainData() - cd.choice=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - if cd.choice==1 then - --● Special Summon this card as a Normal Monster (Spellcaster/Tuner/DARK/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - e:SetProperty(0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - elseif cd.choice==2 then - --● If you have an "Asutra" monster in your field or GY: Target 1 monster your opponent controls; destroy it - 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_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local cd=e:GetChainData() - if cd.choice==1 then - --● Special Summon this card as a Normal Monster (Spellcaster/Tuner/DARK/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ASUTRA,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_SPELLCASTER,ATTRIBUTE_DARK) then - c:AddMonsterAttribute(TYPE_NORMAL|TYPE_TUNER) - Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) - c:AddMonsterAttributeComplete() - end - if Duel.SpecialSummonComplete()==0 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 - elseif cd.choice==2 then - --● If you have an "Asutra" monster in your field or GY: Target 1 monster your opponent controls; destroy it - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101402075.lua b/pre-release/c101402075.lua deleted file mode 100644 index a66963587c..0000000000 --- a/pre-release/c101402075.lua +++ /dev/null @@ -1,64 +0,0 @@ ---剣鬼の神域 ---Asutra Divine Domain ---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:SetTarget(s.efftg) - e1:SetOperation(s.effop) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e1) -end -s.listed_series={SET_ASUTRA} -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - --● Special Summon this card as a Normal Monster (Aqua/Tuner/WATER/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ASUTRA,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_AQUA,ATTRIBUTE_WATER) - --● When your opponent activates a Spell/Trap Card or effect and they control no face-down cards: Negate that effect - local b2_event,_,event_p,event_v,event_reff=Duel.CheckEvent(EVENT_CHAINING,true) - local b2=b2_event and event_p==1-tp and event_reff:IsSpellTrapEffect() and Chain.IsDisablable(event_v) - and not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) - if chk==0 then return b1 or b2 end - local cd=e:GetChainData() - cd.choice=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - if cd.choice==1 then - --● Special Summon this card as a Normal Monster (Aqua/Tuner/WATER/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - elseif cd.choice==2 then - --● When your opponent activates a Spell/Trap Card or effect and they control no face-down cards: Negate that effect - cd.negate_chain_link=event_v - e:SetCategory(CATEGORY_DISABLE) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,event_reff:GetHandler(),1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local cd=e:GetChainData() - if cd.choice==1 then - --● Special Summon this card as a Normal Monster (Aqua/Tuner/WATER/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ASUTRA,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_AQUA,ATTRIBUTE_WATER) then - c:AddMonsterAttribute(TYPE_NORMAL|TYPE_TUNER) - Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) - c:AddMonsterAttributeComplete() - end - if Duel.SpecialSummonComplete()==0 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 - elseif cd.choice==2 then - --● When your opponent activates a Spell/Trap Card or effect and they control no face-down cards: Negate that effect - Duel.NegateEffect(cd.negate_chain_link) - end -end \ No newline at end of file diff --git a/pre-release/c101402076.lua b/pre-release/c101402076.lua deleted file mode 100644 index 19604e16e3..0000000000 --- a/pre-release/c101402076.lua +++ /dev/null @@ -1,85 +0,0 @@ ---海竜神の大渦 ---Daedalus Maelstrom ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --When your opponent would Normal or Special Summon a monster(s) while you control "Atlantis, the Dragon City": Negate the Summon, and if you do, destroy that monster(s), then if you control a WATER Link Monster, you can destroy all non-WATER monsters on the field - local e1a=Effect.CreateEffect(c) - e1a:SetDescription(aux.Stringid(id,0)) - e1a:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) - e1a:SetType(EFFECT_TYPE_ACTIVATE) - e1a:SetCode(EVENT_SUMMON) - e1a:SetCountLimit(1,id) - e1a:SetCondition(s.condition) - e1a:SetTarget(s.target) - e1a:SetOperation(s.activate) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EVENT_SPSUMMON) - c:RegisterEffect(e1b) - --You can banish this card from your GY and send 1 face-up "Umi" you control to the GY, then target 1 monster your opponent controls; send it to the GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOGRAVE) - 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:SetCost(Cost.AND(Cost.SelfBanish,s.tgcost)) - e2:SetTarget(s.tgtg) - e2:SetOperation(s.tgop) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - c:RegisterEffect(e2) -end -s.listed_names={CARD_ATLANTIS_THE_DRAGON_CITY,CARD_UMI} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain(true)==0 and eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_ATLANTIS_THE_DRAGON_CITY),tp,LOCATION_ONFIELD,0,1,nil) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,#eg,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,#eg,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_ALL,LOCATION_MZONE) -end -function s.desconfilter(c) - return c:IsAttribute(ATTRIBUTE_WATER) and c:IsLinkMonster() -end -function s.desfilter(c) - return c:IsAttributeExcept(ATTRIBUTE_WATER) or c:IsFacedown() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.NegateSummon(eg) - if Duel.Destroy(eg,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - if #g>0 then - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end - end -end -function s.tgcostfilter(c) - return c:IsCode(CARD_UMI) and c:IsFaceup() and c:IsAbleToGraveAsCost() -end -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST) -end -function s.tgtg(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:IsAbleToGrave() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101402136.lua b/pre-release/c101402136.lua deleted file mode 100644 index a9a6aeee6c..0000000000 --- a/pre-release/c101402136.lua +++ /dev/null @@ -1,3 +0,0 @@ ---真紅眼の超越黒竜 ---Red-Eyes Black Dragon Exceed -Duel.LoadCardScriptAlias(101402036) \ No newline at end of file From a985c90a056ed8b275491ff2be8332850047c76d Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 25 Jun 2026 20:00:13 +0300 Subject: [PATCH 2/4] Add files via upload --- pre-release/c100200290.lua | 73 +++++++++++++++++++++ pre-release/c100200291.lua | 93 +++++++++++++++++++++++++++ pre-release/c100200292.lua | 65 +++++++++++++++++++ pre-release/c100200293.lua | 66 +++++++++++++++++++ pre-release/c100200294.lua | 75 ++++++++++++++++++++++ pre-release/c100295121.lua | 111 ++++++++++++++++++++++++++++++++ pre-release/c100296302.lua | 76 ++++++++++++++++++++++ pre-release/c100455001.lua | 84 +++++++++++++++++++++++++ pre-release/c100455002.lua | 58 +++++++++++++++++ pre-release/c100455003.lua | 85 +++++++++++++++++++++++++ pre-release/c100455004.lua | 86 +++++++++++++++++++++++++ pre-release/c100455005.lua | 89 ++++++++++++++++++++++++++ pre-release/c100455006.lua | 96 ++++++++++++++++++++++++++++ pre-release/c100455007.lua | 96 ++++++++++++++++++++++++++++ pre-release/c100455023.lua | 61 ++++++++++++++++++ pre-release/c100455024.lua | 82 ++++++++++++++++++++++++ pre-release/c100455025.lua | 80 +++++++++++++++++++++++ pre-release/c100455026.lua | 107 +++++++++++++++++++++++++++++++ pre-release/c100455027.lua | 97 ++++++++++++++++++++++++++++ pre-release/c100455028.lua | 61 ++++++++++++++++++ pre-release/c100455029.lua | 69 ++++++++++++++++++++ pre-release/c100455047.lua | 114 +++++++++++++++++++++++++++++++++ pre-release/c100455048.lua | 109 ++++++++++++++++++++++++++++++++ pre-release/c100455049.lua | 101 +++++++++++++++++++++++++++++ pre-release/c100455050.lua | 100 +++++++++++++++++++++++++++++ pre-release/c100455051.lua | 114 +++++++++++++++++++++++++++++++++ pre-release/c100455052.lua | 77 +++++++++++++++++++++++ pre-release/c100455053.lua | 81 ++++++++++++++++++++++++ pre-release/c100456001.lua | 72 +++++++++++++++++++++ pre-release/c100456002.lua | 94 +++++++++++++++++++++++++++ pre-release/c100456003.lua | 82 ++++++++++++++++++++++++ pre-release/c100456004.lua | 83 ++++++++++++++++++++++++ pre-release/c100456005.lua | 125 ++++++++++++++++++++++++++++++++++++ pre-release/c100456006.lua | 94 +++++++++++++++++++++++++++ pre-release/c100456007.lua | 65 +++++++++++++++++++ pre-release/c100456008.lua | 71 +++++++++++++++++++++ pre-release/c100456009.lua | 89 ++++++++++++++++++++++++++ pre-release/c100456010.lua | 62 ++++++++++++++++++ pre-release/c100457001.lua | 85 +++++++++++++++++++++++++ pre-release/c100457002.lua | 96 ++++++++++++++++++++++++++++ pre-release/c100457003.lua | 73 +++++++++++++++++++++ pre-release/c100457102.lua | 95 ++++++++++++++++++++++++++++ pre-release/c101304081.lua | 90 ++++++++++++++++++++++++++ pre-release/c101304082.lua | 65 +++++++++++++++++++ pre-release/c101304083.lua | 97 ++++++++++++++++++++++++++++ pre-release/c101304084.lua | 72 +++++++++++++++++++++ pre-release/c101304085.lua | 101 +++++++++++++++++++++++++++++ pre-release/c101304086.lua | 77 +++++++++++++++++++++++ pre-release/c101304087.lua | 81 ++++++++++++++++++++++++ pre-release/c101304088.lua | 90 ++++++++++++++++++++++++++ pre-release/c101304089.lua | 78 +++++++++++++++++++++++ pre-release/c101304090.lua | 74 ++++++++++++++++++++++ pre-release/c101304091.lua | 89 ++++++++++++++++++++++++++ pre-release/c101304092.lua | 86 +++++++++++++++++++++++++ pre-release/c101304093.lua | 116 ++++++++++++++++++++++++++++++++++ pre-release/c101304094.lua | 77 +++++++++++++++++++++++ pre-release/c101304095.lua | 73 +++++++++++++++++++++ pre-release/c101304096.lua | 52 +++++++++++++++ pre-release/c101305081.lua | 112 +++++++++++++++++++++++++++++++++ pre-release/c101305082.lua | 82 ++++++++++++++++++++++++ pre-release/c101305083.lua | 89 ++++++++++++++++++++++++++ pre-release/c101305084.lua | 71 +++++++++++++++++++++ pre-release/c101305085.lua | 96 ++++++++++++++++++++++++++++ pre-release/c101305086.lua | 84 +++++++++++++++++++++++++ pre-release/c101305087.lua | 76 ++++++++++++++++++++++ pre-release/c101305088.lua | 85 +++++++++++++++++++++++++ pre-release/c101305089.lua | 126 +++++++++++++++++++++++++++++++++++++ pre-release/c101305090.lua | 94 +++++++++++++++++++++++++++ pre-release/c101305091.lua | 86 +++++++++++++++++++++++++ pre-release/c101305092.lua | 94 +++++++++++++++++++++++++++ pre-release/c101305093.lua | 86 +++++++++++++++++++++++++ pre-release/c101305094.lua | 93 +++++++++++++++++++++++++++ pre-release/c101305095.lua | 77 +++++++++++++++++++++++ pre-release/c101305096.lua | 82 ++++++++++++++++++++++++ pre-release/c101402001.lua | 99 +++++++++++++++++++++++++++++ pre-release/c101402002.lua | 70 +++++++++++++++++++++ pre-release/c101402003.lua | 72 +++++++++++++++++++++ pre-release/c101402004.lua | 69 ++++++++++++++++++++ pre-release/c101402009.lua | 108 +++++++++++++++++++++++++++++++ pre-release/c101402010.lua | 100 +++++++++++++++++++++++++++++ pre-release/c101402011.lua | 110 ++++++++++++++++++++++++++++++++ pre-release/c101402012.lua | 100 +++++++++++++++++++++++++++++ pre-release/c101402013.lua | 91 +++++++++++++++++++++++++++ pre-release/c101402014.lua | 67 ++++++++++++++++++++ pre-release/c101402015.lua | 75 ++++++++++++++++++++++ pre-release/c101402016.lua | 71 +++++++++++++++++++++ pre-release/c101402021.lua | 98 +++++++++++++++++++++++++++++ pre-release/c101402022.lua | 89 ++++++++++++++++++++++++++ pre-release/c101402023.lua | 90 ++++++++++++++++++++++++++ 89 files changed, 7652 insertions(+) create mode 100644 pre-release/c100200290.lua create mode 100644 pre-release/c100200291.lua create mode 100644 pre-release/c100200292.lua create mode 100644 pre-release/c100200293.lua create mode 100644 pre-release/c100200294.lua create mode 100644 pre-release/c100295121.lua create mode 100644 pre-release/c100296302.lua create mode 100644 pre-release/c100455001.lua create mode 100644 pre-release/c100455002.lua create mode 100644 pre-release/c100455003.lua create mode 100644 pre-release/c100455004.lua create mode 100644 pre-release/c100455005.lua create mode 100644 pre-release/c100455006.lua create mode 100644 pre-release/c100455007.lua create mode 100644 pre-release/c100455023.lua create mode 100644 pre-release/c100455024.lua create mode 100644 pre-release/c100455025.lua create mode 100644 pre-release/c100455026.lua create mode 100644 pre-release/c100455027.lua create mode 100644 pre-release/c100455028.lua create mode 100644 pre-release/c100455029.lua create mode 100644 pre-release/c100455047.lua create mode 100644 pre-release/c100455048.lua create mode 100644 pre-release/c100455049.lua create mode 100644 pre-release/c100455050.lua create mode 100644 pre-release/c100455051.lua create mode 100644 pre-release/c100455052.lua create mode 100644 pre-release/c100455053.lua create mode 100644 pre-release/c100456001.lua create mode 100644 pre-release/c100456002.lua create mode 100644 pre-release/c100456003.lua create mode 100644 pre-release/c100456004.lua create mode 100644 pre-release/c100456005.lua create mode 100644 pre-release/c100456006.lua create mode 100644 pre-release/c100456007.lua create mode 100644 pre-release/c100456008.lua create mode 100644 pre-release/c100456009.lua create mode 100644 pre-release/c100456010.lua create mode 100644 pre-release/c100457001.lua create mode 100644 pre-release/c100457002.lua create mode 100644 pre-release/c100457003.lua create mode 100644 pre-release/c100457102.lua create mode 100644 pre-release/c101304081.lua create mode 100644 pre-release/c101304082.lua create mode 100644 pre-release/c101304083.lua create mode 100644 pre-release/c101304084.lua create mode 100644 pre-release/c101304085.lua create mode 100644 pre-release/c101304086.lua create mode 100644 pre-release/c101304087.lua create mode 100644 pre-release/c101304088.lua create mode 100644 pre-release/c101304089.lua create mode 100644 pre-release/c101304090.lua create mode 100644 pre-release/c101304091.lua create mode 100644 pre-release/c101304092.lua create mode 100644 pre-release/c101304093.lua create mode 100644 pre-release/c101304094.lua create mode 100644 pre-release/c101304095.lua create mode 100644 pre-release/c101304096.lua create mode 100644 pre-release/c101305081.lua create mode 100644 pre-release/c101305082.lua create mode 100644 pre-release/c101305083.lua create mode 100644 pre-release/c101305084.lua create mode 100644 pre-release/c101305085.lua create mode 100644 pre-release/c101305086.lua create mode 100644 pre-release/c101305087.lua create mode 100644 pre-release/c101305088.lua create mode 100644 pre-release/c101305089.lua create mode 100644 pre-release/c101305090.lua create mode 100644 pre-release/c101305091.lua create mode 100644 pre-release/c101305092.lua create mode 100644 pre-release/c101305093.lua create mode 100644 pre-release/c101305094.lua create mode 100644 pre-release/c101305095.lua create mode 100644 pre-release/c101305096.lua create mode 100644 pre-release/c101402001.lua create mode 100644 pre-release/c101402002.lua create mode 100644 pre-release/c101402003.lua create mode 100644 pre-release/c101402004.lua create mode 100644 pre-release/c101402009.lua create mode 100644 pre-release/c101402010.lua create mode 100644 pre-release/c101402011.lua create mode 100644 pre-release/c101402012.lua create mode 100644 pre-release/c101402013.lua create mode 100644 pre-release/c101402014.lua create mode 100644 pre-release/c101402015.lua create mode 100644 pre-release/c101402016.lua create mode 100644 pre-release/c101402021.lua create mode 100644 pre-release/c101402022.lua create mode 100644 pre-release/c101402023.lua diff --git a/pre-release/c100200290.lua b/pre-release/c100200290.lua new file mode 100644 index 0000000000..667e2a7cc6 --- /dev/null +++ b/pre-release/c100200290.lua @@ -0,0 +1,73 @@ +--運命の盤上 +--Stage of Destiny +--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 Normal Monster in your hand + 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(s.costfilter,e:GetHandlerPlayer(),LOCATION_HAND,0,1,nil) end) + c:RegisterEffect(e0) + --Special Summon up to 5 Normal Monsters from your hand and/or GY in Attack Position, also you cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetLabelObject(e0) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +function s.costfilter(c) + return c:IsType(TYPE_NORMAL) and not c:IsPublic() +end +function s.cost(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,s.costfilter,tp,LOCATION_HAND,0,1,1,nil) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + end +end +function s.spfilter(c,e,tp) + return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.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.activate(e,tp,eg,ep,ev,re,r,rp) + local mmz_count=Duel.GetLocationCount(tp,LOCATION_MZONE) + if mmz_count>0 then + mmz_count=math.min(mmz_count,5) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then mmz_count=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,mmz_count,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) + end + end + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + --You cannot Special Summon from the Extra Deck for the rest of this 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_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c100200291.lua b/pre-release/c100200291.lua new file mode 100644 index 0000000000..dfd10e81bc --- /dev/null +++ b/pre-release/c100200291.lua @@ -0,0 +1,93 @@ +--カプセル・モンスター・チェス +--Capsule Monster Chess +--scripted by Naim +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 Main Phase: The turn player can target 1 monster in their GY; they place it face-up in their Spell & Trap Zone as a Continuous Spell + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LEAVE_GRAVE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_BOTH_SIDE) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --During the End Phase: The turn player can send 1 face-up Monster Card they control to the GY; they Special Summon 1 monster from their Deck with the same original Type and Attribute, but 1, 2, or 3 original Levels higher + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_FZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) + return Duel.IsTurnPlayer(tp) + end) + e2:SetCost(s.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.plfilter(c,tp) + return c:IsMonster() and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.plfilter(chkc,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingTarget(s.plfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local g=Duel.SelectTarget(tp,s.plfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,tp,0) +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then + --Treated as a Continuous Spell + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_TYPE) + e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)) + tc:RegisterEffect(e1) + end +end +function s.spcostfilter(c,e,tp) + return c:IsMonsterCard() and c:IsFaceup() and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalRace(),c:GetOriginalAttribute(),c:GetOriginalLevel()) +end +function s.spfilter(c,e,tp,original_race,original_attr,original_lv) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsOriginalRace(original_race) and c:IsOriginalAttribute(original_attr) + and c:IsLevelBetween(original_lv+1,original_lv+3) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp):GetFirst() + Duel.SendtoGrave(sc,REASON_COST) + local cd=e:GetChainData() + cd.original_race=sc:GetOriginalRace() + cd.original_attr=sc:GetOriginalAttribute() + cd.original_lv=sc:GetOriginalLevel() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local cd=e:GetChainData() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,cd.original_race,cd.original_attr,cd.original_lv) + 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/c100200292.lua b/pre-release/c100200292.lua new file mode 100644 index 0000000000..cda39ccf8b --- /dev/null +++ b/pre-release/c100200292.lua @@ -0,0 +1,65 @@ +--サラブレッド・エルフ +--Thoroughbred Elf +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --During your Main Phase: You can send 1 Equip Spell from your Deck to the GY, then this card gains 500 ATK until the end of your opponent's turn. You can only use this effect of "Thoroughbred Elf" once per turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) + --When this card destroys an opponent's monster by battle: You can add to your hand, or Special Summon, 1 Level 4 or lower LIGHT Spellcaster monster from your Deck, except "Thoroughbred Elf" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_DESTROYING) + e2:SetCondition(aux.bdocon) + e2:SetTarget(s.thsptg) + e2:SetOperation(s.thspop) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsEquipSpell,Card.IsAbleToGrave),tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,500) +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,aux.AND(Card.IsEquipSpell,Card.IsAbleToGrave),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 500 ATK until the end of your opponent's turn + c:UpdateAttack(500,RESETS_STANDARD_DISABLE_PHASE_END,c,2) + end +end +function s.thspfilter(c,e,tp,mmz_chk) + return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER) and not c:IsCode(id) + 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,0,1,nil,e,tp,mmz_chk) + end + 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) + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) + local tc=Duel.SelectMatchingCard(tp,s.thspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mmz_chk):GetFirst() + if not tc then return end + aux.ToHandOrElse(tc,tp, + function() return mmz_chk and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, + function() Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end, + aux.Stringid(id,3) + ) +end \ No newline at end of file diff --git a/pre-release/c100200293.lua b/pre-release/c100200293.lua new file mode 100644 index 0000000000..5fed43bd81 --- /dev/null +++ b/pre-release/c100200293.lua @@ -0,0 +1,66 @@ +--アサルト・リオン +--Assault Lion +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can Tribute Summon this card face-up by Tributing 1 Beast-Warrior monster + aux.AddNormalSummonProcedure(c,true,true,1,1,SUMMON_TYPE_TRIBUTE,aux.Stringid(id,0),s.tribfilter) + --If this card battles a monster, any battle damage it inflicts to your opponent is doubled + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) + e1:SetCondition(function(e) return e:GetHandler():GetBattleTarget() end) + e1:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) + c:RegisterEffect(e1) + --If a Beast-Warrior monster(s) is Normal or Special Summoned to your field while this card is in your GY: You can add this card to your hand, then immediately after this effect resolves, you can Tribute Summon this card face-up, and if you do, it gains 500 ATK, also banish it when it leaves the field + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_REMOVE) + 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_GRAVE) + e2a:SetCountLimit(1,id) + e2a:SetCondition(s.thcon) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) +end +function s.tribfilter(c,tp) + return c:IsRace(RACE_BEASTWARRIOR) and (c:IsControler(tp) or c:IsFaceup()) +end +function s.thconfilter(c,tp) + return c:IsRace(RACE_BEASTWARRIOR) and c:IsControler(tp) and c:IsFaceup() +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return 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) + Duel.SetPossibleOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.thop(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 c:IsLocation(LOCATION_HAND) then + Duel.ShuffleHand(tp) + if c:IsSummonable(true,nil,1) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Summon(tp,c,true,nil,1) + --It gains 500 ATK + c:UpdateAttack(500,RESET_EVENT|(RESETS_STANDARD_DISABLE&~RESET_TOFIELD)) + --Also 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 + end +end \ No newline at end of file diff --git a/pre-release/c100200294.lua b/pre-release/c100200294.lua new file mode 100644 index 0000000000..333e887c01 --- /dev/null +++ b/pre-release/c100200294.lua @@ -0,0 +1,75 @@ +--パワーコネクション +--Power Connection +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Target any number of face-up monsters you control (if you target 2 or more monsters, they must have the same Type); they gain 500 ATK for each monster targeted, until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + 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) + --If you activated "Armament Reincarnation" this turn: You can add this card from your GY to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Keep track of a player activating "Armament Reincarnation" + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_CHAIN_SOLVED) + ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(53770666) then + Duel.RegisterFlagEffect(ep,id,RESET_PHASE|PHASE_END,0,1) + end + end) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_names={53770666} --"Armament Reincarnation" +function s.rescon(sg,e,tp,mg) + return #sg==1 or sg:GetClassCount(Card.GetRace)==1 +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end + local g=Duel.GetTargetGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) + local tg=aux.SelectUnselectGroup(g,e,tp,1,#g,s.rescon,1,tp,HINTMSG_ATKDEF) + Duel.SetTargetCard(tg) + local target_count=#tg + e:SetLabel(target_count) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tg,target_count,tp,500*target_count) +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 return end + local c=e:GetHandler() + local atk=500*e:GetLabel() + for tc in tg:Iter() do + --They gain 500 ATK for each monster targeted, until the end of this turn + tc:UpdateAttack(atk,RESETS_STANDARD_PHASE_END,c) + 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,chk) + 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/c100295121.lua b/pre-release/c100295121.lua new file mode 100644 index 0000000000..435eae5dbc --- /dev/null +++ b/pre-release/c100295121.lua @@ -0,0 +1,111 @@ +--道化の一座 ハット +--Clown Crew Hat +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --During your Main Phase: You can send 1 "Clown Crew" card from your Deck to your GY, except a Pendulum Monster, and if you do, Special Summon this card, 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_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetTarget(s.gytg) + e1:SetOperation(s.gyop) + e1:SetCountLimit(1,{id,0}) + c:RegisterEffect(e1) + --Monsters your opponent controls lose 1500 DEF while you control a Tribute Summoned monster + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_UPDATE_DEFENSE) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(0,LOCATION_MZONE) + e2:SetCondition(function(e) return Duel.IsExistingMatchingCard(Card.IsTributeSummoned,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end) + e2:SetValue(-1500) + c:RegisterEffect(e2) + --If this card is Tributed: You can activate 1 of these effects (but you can only use each of these effects of "Clown Crew Hat" once per turn); + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_RELEASE) + e3:SetTarget(s.efftg) + e3:SetOperation(s.effop) + c:RegisterEffect(e3) +end +s.listed_series={SET_CLOWN_CREW} +function s.gyfilter(c) + return c:IsSetCard(SET_CLOWN_CREW) and not c:IsPendulumMonster() and c:IsAbleToGrave() +end +function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.gyop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.gyfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,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(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.actval) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) +end +function s.actval(e,re,tp) + local rc=re:GetHandler() + return re:IsMonsterEffect() and rc:IsLocation(LOCATION_MZONE) and rc:IsSummonLocation(LOCATION_DECK|LOCATION_EXTRA) +end +function s.spfilter(c,e,tp) + if c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end + if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)<=0 then return false end + return c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and not c:IsPendulumMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +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.IsPendulumMonster,Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_MZONE|LOCATION_EXTRA,LOCATION_MZONE|LOCATION_EXTRA,1,nil) + local b2=not Duel.HasFlagEffect(tp,id+100) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + 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_EXTRA) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Shuffle all Pendulum Monsters on the field and face-up Extra Decks into the Deck + local g=Duel.GetMatchingGroup(aux.AND(Card.IsPendulumMonster,Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_MZONE|LOCATION_EXTRA,LOCATION_MZONE|LOCATION_EXTRA,nil) + if #g>0 then + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + elseif op==2 then + --● Special Summon 1 non-Pendulum "Clown Crew" monster from your Deck or Extra Deck, ignoring its Summoning conditions + 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,true,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100296302.lua b/pre-release/c100296302.lua new file mode 100644 index 0000000000..3175781101 --- /dev/null +++ b/pre-release/c100296302.lua @@ -0,0 +1,76 @@ +--ウィッチクラフト・シード +--Witchcrafter Seed +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is Normal or Special Summoned and you control a "Witchcrafter" monster other than "Witchcrafter Seed", or "Regulus, the Prince of Endymion": You can target 1 face-up card on the field; return it to the hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_TOHAND) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,{id,0}) + e1a:SetTarget(s.rthtg) + e1a:SetOperation(s.rthop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --You can banish this card from your GY; reveal any number of cards in your hand, including a Spell, and shuffle them into the Deck, then draw that many cards + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) + c:RegisterEffect(e2) +end +s.listed_series={SET_WITCHCRAFTER} +s.listed_names={id,CARD_REGULUS_THE_PRINCE_OF_ENDYMION} +function s.rthconfilter(c) + return ((c:IsSetCard(SET_WITCHCRAFTER) and c:IsMonster() and not c:IsCode(id)) or c:IsCode(CARD_REGULUS_THE_PRINCE_OF_ENDYMION)) + and c:IsFaceup() +end +function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc:IsAbleToHand() end + if chk==0 then return Duel.IsExistingMatchingCard(s.rthconfilter,tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToHand),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToHand),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.rthop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp) + and Duel.IsExistingMatchingCard(aux.AND(Card.IsSpell,Card.IsAbleToDeck,aux.NOT(Card.IsPublic)),tp,LOCATION_HAND,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsSpell,1,nil) +end +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(aux.AND(Card.IsAbleToDeck,aux.NOT(Card.IsPublic)),tp,LOCATION_HAND,0,nil) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,1,#g,s.rescon,1,tp,HINTMSG_TODECK,s.rescon) + if #sg>0 then + Duel.ConfirmCards(1-tp,sg) + local returned_count=Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + if returned_count>0 then + Duel.ShuffleDeck(tp) + if Duel.IsPlayerCanDraw(tp) then + Duel.BreakEffect() + Duel.Draw(tp,returned_count,REASON_EFFECT) + end + end + end +end \ No newline at end of file diff --git a/pre-release/c100455001.lua b/pre-release/c100455001.lua new file mode 100644 index 0000000000..235f841c24 --- /dev/null +++ b/pre-release/c100455001.lua @@ -0,0 +1,84 @@ +--ファニー・ダーク・ラビット +--Funny Dark Rabbit +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --After this card is Normal or Special Summoned, you can Normal Summon 1 monster that mentions "Toon World" during your Main Phase this turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn) + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetOperation(s.regop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --This card is treated as a Toon monster while "Toon World" is on the field + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_ADD_TYPE) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) + e2:SetValue(TYPE_TOON) + c:RegisterEffect(e2) + --Once per turn: You can add to your hand or place face-up on your field, 1 "Toon" Field or Continuous Spell from your Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetTarget(s.thpltg) + e3:SetOperation(s.thplop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_TOON_WORLD} +s.listed_series={SET_TOON} +function s.regop(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1)) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --After this card is Normal or Special Summoned, you can Normal Summon 1 monster that mentions "Toon World" during your Main Phase this 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,2)) + 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:ListsCode(CARD_TOON_WORLD) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thplfilter(c,tp,szone_chk) + return c:IsSetCard(SET_TOON) and (c:IsContinuousSpell() or c:IsFieldSpell()) and (c:IsAbleToHand() + or (c:CheckUniqueOnField(tp) and not c:IsForbidden() and (c:IsFieldSpell() or szone_chk))) +end +function s.thpltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thplfilter,tp,LOCATION_DECK,0,1,nil,tp,Duel.GetLocationCount(tp,LOCATION_SZONE)>0) end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thplop(e,tp,eg,ep,ev,re,r,rp) + local szone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local sc=Duel.SelectMatchingCard(tp,s.thplfilter,tp,LOCATION_DECK,0,1,1,nil,tp,szone_chk):GetFirst() + if sc then + aux.ToHandOrElse(sc,tp, + function(sc) + return szone_chk or sc:IsFieldSpell() + end, + function(sc) + if sc:IsFieldSpell() then + local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) + if fc then + Duel.SendtoGrave(fc,REASON_RULE) + Duel.BreakEffect() + end + Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) + else + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end + end, + aux.Stringid(id,4) + ) + end +end \ No newline at end of file diff --git a/pre-release/c100455002.lua b/pre-release/c100455002.lua new file mode 100644 index 0000000000..0ed2f4fc9e --- /dev/null +++ b/pre-release/c100455002.lua @@ -0,0 +1,58 @@ +--コミックキャット +--Comic Cat +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --This card is treated as a Toon monster while "Toon World" is on the field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_ADD_TYPE) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) + e1:SetValue(TYPE_TOON) + c:RegisterEffect(e1) + --During the Main Phase (Quick Effect): You can Tribute 1 monster (if you control "Toon World", you can Tribute 1 monster your opponent controls, even though you do not control it), and if you do, Special Summon 1 monster that mentions "Toon World" from your hand or Deck, ignoring its Summoning conditions + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + 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 +s.listed_names={CARD_TOON_WORLD} +function s.tribfilter(c,tp) + return c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:ListsCode(CARD_TOON_WORLD) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local opp_location=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),tp,LOCATION_ONFIELD,0,1,nil) and LOCATION_MZONE or 0 + return Duel.IsExistingMatchingCard(s.tribfilter,tp,LOCATION_MZONE,opp_location,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) + end + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,PLAYER_EITHER,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local opp_location=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),tp,LOCATION_ONFIELD,0,1,nil) and LOCATION_MZONE or 0 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local rg=Duel.SelectMatchingCard(tp,s.tribfilter,tp,LOCATION_MZONE,opp_location,1,1,nil,tp) + if #rg==0 then return end + Duel.HintSelection(rg) + if Duel.Release(rg,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100455003.lua b/pre-release/c100455003.lua new file mode 100644 index 0000000000..d9cd4a633c --- /dev/null +++ b/pre-release/c100455003.lua @@ -0,0 +1,85 @@ +--エビル・ボックス +--Evil Box +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you control "Toon World": You can Special Summon this card from your hand, then you can add to your hand or Set 1 "Toon" Trap from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SET) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(s.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --This card is treated as a Toon monster while "Toon World" is on the field + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_ADD_TYPE) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end) + e2:SetValue(TYPE_TOON) + c:RegisterEffect(e2) + --Once per turn (Quick Effect): You can target 1 card in either GY; place it on the bottom of the Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TODECK) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetTarget(s.tdtg) + e3:SetOperation(s.tdop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +s.listed_names={CARD_TOON_WORLD} +s.listed_series={SET_TOON} +function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_TOON_WORLD),tp,LOCATION_ONFIELD,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) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) +end +function s.thsetfilter(c) + return c:IsSetCard(SET_TOON) and c:IsTrap() and (c:IsAbleToHand() or c:IsSSetable()) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 + and Duel.IsExistingMatchingCard(s.thsetfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local sc=Duel.SelectMatchingCard(tp,s.thsetfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if not sc then return end + aux.ToHandOrElse(sc,tp, + Card.IsSSetable, + function(c) + Duel.SSet(tp,sc) + end, + aux.Stringid(id,4) + ) + end +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100455004.lua b/pre-release/c100455004.lua new file mode 100644 index 0000000000..f2a3fe4419 --- /dev/null +++ b/pre-release/c100455004.lua @@ -0,0 +1,86 @@ +--闇の眼を持つ幻想師・ノー・フェイス +--Dark-Eyes Illusionist Faceless Mage +--scripted by Naim +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 discard this card, then activate 1 of these effects (but you can only use each of these effects of "Dark-Eyes Illusionist Faceless Mage" once per turn); + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_HAND) + e2:SetCost(Cost.SelfDiscard) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_names={100455007,CARD_TOON_WORLD} --"Mind Scan" +function s.indestg(e,c) + local handler=e:GetHandler() + return c==handler or c==handler:GetBattleTarget() +end +function s.plfilter(c,tp) + return c:IsCode(100455007) and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.thfilter(c) + return c:IsMonster() and c:ListsCode(CARD_TOON_WORLD) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp) + and not Duel.HasFlagEffect(tp,id) + local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) + and not Duel.HasFlagEffect(tp,id+100) + 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(0) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + elseif op==2 then + e:GetHandler():CreateEffectRelation(e) + e:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Place 1 "Mind Scan" from your hand or Deck face-up on your field + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp):GetFirst() + if sc then + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end + elseif op==2 then + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + --● Add 1 other monster from your GY to your hand that mentions "Toon World", then you can Special Summon it, ignoring its Summoning conditions + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,exc):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and sc:IsCanBeSpecialSummoned(e,0,tp,true,false) then + Duel.ShuffleHand(tp) + if Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Duel.SpecialSummon(sc,0,tp,tp,true,false,POS_FACEUP) + end + end + end +end \ No newline at end of file diff --git a/pre-release/c100455005.lua b/pre-release/c100455005.lua new file mode 100644 index 0000000000..583c2fe9f3 --- /dev/null +++ b/pre-release/c100455005.lua @@ -0,0 +1,89 @@ +--ブルーアイズ・トゥーン・アルティメットドラゴン +--Blue-Eyes Toon Ultimate Dragon +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: "Blue-Eyes Toon Dragon" + 2 Toon monsters + Fusion.AddProcMixN(c,true,true,53183600,1,s.toonmatfilter,2) + --Must be Special Summoned (from your Extra Deck) by shuffling the above cards from your hand, field, and/or GY into the Deck/Extra Deck + Fusion.AddContactProc(c,s.contactfil,s.contactop,true) + --Your Toon monsters can attack directly + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_DIRECT_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsType(TYPE_TOON) end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Once per turn: You can add 1 "Toon" card, or 1 card that mentions a "Toon" card's name, from your GY to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --During damage calculation, if your Toon monster is attacked: You can banish it until the end of the Damage Step + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_REMOVE) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(s.rmcon) + e3:SetTarget(s.rmtg) + e3:SetOperation(s.rmop) + c:RegisterEffect(e3) +end +s.listed_names={53183600} --"Blue-Eyes Toon Dragon" +s.listed_series={SET_TOON} +function s.toonmatfilter(c,fc,sumtype,tp) + return c:IsType(TYPE_TOON,fc,sumtype,tp) and c:IsMonster() +end +function s.contactfil(tp) + return Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) +end +function s.contactop(g,tp) + local fu,fd=g:Split(Card.IsFaceup,nil) + if #fu>0 then Duel.HintSelection(fu) end + if #fd>0 then Duel.ConfirmCards(1-tp,fd) end + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) +end +function s.thfilter(c) + return (c:IsSetCard(SET_TOON) or c:ListsCodeWithArchetype(SET_TOON)) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,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,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end +function s.rmcon(e,tp,eg,ep,ev,re,r,rp) + local bc=Duel.GetAttackTarget() + return bc and bc:IsControler(tp) and bc:IsType(TYPE_TOON) and bc:IsAbleToRemove() +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,Duel.GetAttackTarget(),1,tp,0) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local bc=Duel.GetAttackTarget() + if bc and bc:IsRelateToBattle() then + --Banish it until the end of the Damage Step + local temp_banish_eff=aux.RemoveUntil(bc,nil,REASON_EFFECT,PHASE_DAMAGE,id,e,tp,aux.DefaultFieldReturnOp) + local e1=temp_banish_eff:Clone() + e1:SetCode(EVENT_DAMAGE_STEP_END) + Duel.RegisterEffect(e1,tp) + temp_banish_eff:Reset() + end +end \ No newline at end of file diff --git a/pre-release/c100455006.lua b/pre-release/c100455006.lua new file mode 100644 index 0000000000..478b7543ea --- /dev/null +++ b/pre-release/c100455006.lua @@ -0,0 +1,96 @@ +--完全なる世界 トゥーン・ワールド +--Toon World the Perfect World +--Scripted by Eerie Code +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) + --This card's name becomes "Toon World" while in the Field Zone + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetRange(LOCATION_FZONE) + e1:SetValue(CARD_TOON_WORLD) + c:RegisterEffect(e1) + --Once per turn: You can add 1 "Toon" card, or 1 card that mentions a "Toon" card's name, from your Deck to your hand. You can only use this effect of "Toon World the Perfect World" thrice per turn + 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_FZONE) + e2:SetCountLimit(3,id) + e2:SetCost(s.thcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Before resolving another activated card or effect, you can banish 1 Toon monster you control until immediately after that card/effect resolves, also you cannot banish monsters with that same original name with this effect of "Toon World the Perfect World" for the rest of this turn + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3:SetCode(EVENT_CHAIN_SOLVING) + e3:SetRange(LOCATION_FZONE) + e3:SetCondition(s.rmcon) + e3:SetOperation(s.rmop) + c:RegisterEffect(e3) + --Keep track of already banished cards + aux.GlobalCheck(s,function() + s.name_list={} + s.name_list[0]={} + s.name_list[1]={} + aux.AddValuesReset(function() + s.name_list[0]={} + s.name_list[1]={} + end) + end) +end +s.listed_names={CARD_TOON_WORLD} +s.listed_series={SET_TOON} +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:HasFlagEffect(id) end + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) +end +function s.thfilter(c) + return (c:IsSetCard(SET_TOON) or c:ListsCodeWithArchetype(SET_TOON)) 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.rmfilter(c,tp) + return c:IsType(TYPE_TOON) and c:IsFaceup() and c:IsAbleToRemove() and not s.name_list[tp][c:GetOriginalCodeRule()] +end +function s.rmcon(e,tp,eg,ep,ev,re,r,rp) + return re:IsActivated() and re:GetHandler()~=e:GetHandler() + and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE,0,1,nil,tp) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE,0,nil,tp) + if #g>0 and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,1)) then + Duel.Hint(HINT_CARD,0,id) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local sc=g:Select(tp,1,1,nil):GetFirst() + if sc then + Duel.HintSelection(sc) + --Banish 1 Toon monster you control until immediately after that card/effect resolves + local temp_banish_eff=aux.RemoveUntil(sc,nil,REASON_EFFECT,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp,nil,RESET_CHAIN) + local e1=temp_banish_eff:Clone() + e1:SetCode(EVENT_CHAIN_SOLVED) + Duel.RegisterEffect(e1,tp) + temp_banish_eff:Reset() + --Also you cannot banish monsters with that same original name with this effect of "Toon World the Perfect World" for the rest of this turn + s.name_list[tp][sc:GetOriginalCodeRule()]=true + end + end +end \ No newline at end of file diff --git a/pre-release/c100455007.lua b/pre-release/c100455007.lua new file mode 100644 index 0000000000..a8112031f7 --- /dev/null +++ b/pre-release/c100455007.lua @@ -0,0 +1,96 @@ +--心を見通す眼 +--Mind Scan +--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) + e0:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e0) + --While you have a "Toon" card in your field or GY, your opponent must keep their hand revealed, also you can look at their Set cards at any time + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e1:SetCode(EFFECT_PUBLIC) + e1:SetRange(LOCATION_SZONE) + e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_TOON),e:GetHandlerPlayer(),LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end) + e1:SetTargetRange(0,LOCATION_HAND|LOCATION_ONFIELD) + c:RegisterEffect(e1) + --If you have a Toon monster and a "Toon" Spell in your field and/or GY: You can declare 1 card name that is not among the cards/effects activated in this Chain; negate the activated effects of cards with that original name until the end of this turn, while this card is face-up on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(s.declcon) + e2:SetTarget(s.decltg) + e2:SetOperation(s.declop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_TOON} +function s.declconfilter(c) + return ((c:IsType(TYPE_TOON) and c:IsMonster()) or (c:IsSetCard(SET_TOON) and c:IsSpell())) and c:IsFaceup() +end +function s.declcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.GetMatchingGroup(s.declconfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil):GetClassCount(Card.GetMainCardType)==2 +end +function s.decltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local current_chain=Duel.GetCurrentChain() + s.announce_filter={TYPE_NORMAL,OPCODE_ISTYPE,OPCODE_NOT} + if current_chain>1 then + for i=1,current_chain-1 do + local trig_code1,trig_code2=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2) + table.insert(s.announce_filter,trig_code1) + table.insert(s.announce_filter,OPCODE_ISCODE) + table.insert(s.announce_filter,OPCODE_NOT) + table.insert(s.announce_filter,OPCODE_AND) + if trig_code2>0 then + table.insert(s.announce_filter,trig_code2) + table.insert(s.announce_filter,OPCODE_ISCODE) + table.insert(s.announce_filter,OPCODE_NOT) + table.insert(s.announce_filter,OPCODE_AND) + end + end + end + local declared_code=Duel.AnnounceCard(tp,s.announce_filter) + Duel.SetTargetParam(declared_code) + Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD_FILTER) +end +function s.declop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + local declared_code=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + c:SetHint(CHINT_CARD,declared_code) + --Clear the hint at the end of the turn + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EVENT_TURN_END) + e0:SetRange(LOCATION_SZONE) + e0:SetCountLimit(1) + e0:SetOperation(function(e) c:SetHint(CHINT_CARD,0) e:Reset() end) + e0:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e0) + --Negate the activated effects of cards with that original name until the end of this turn, while this card is face-up on the field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EVENT_CHAIN_SOLVING) + e1:SetRange(LOCATION_SZONE) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) + local code1,code2=re:GetHandler():GetOriginalCodeRule() + return code1==declared_code or code2==declared_code + end) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + Duel.NegateEffect(ev) + end) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c100455023.lua b/pre-release/c100455023.lua new file mode 100644 index 0000000000..580d3cd7da --- /dev/null +++ b/pre-release/c100455023.lua @@ -0,0 +1,61 @@ +--ウィッチクラフト・テラコッタン +--Witchcrafter Terracottan +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is in your hand: You can target 1 "Witchcrafter" card in your GY, except "Witchcrafter Terracottan"; add it to your hand, and if you do, Special Summon this card, also you cannot Special Summon from the Extra Deck for the rest of this turn, except "Witchcrafter" monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.thsptg) + e1:SetOperation(s.thspop) + c:RegisterEffect(e1) + --During your Main Phase: You can Fusion Summon 1 "Witchcrafter" Fusion Monster from your Extra Deck, using monsters from your hand or field + local fusion_params=aux.FilterBoolFunction(Card.IsSetCard,SET_WITCHCRAFTER) + 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) +end +s.listed_series={SET_WITCHCRAFTER} +s.listed_names={id} +function s.thfilter(c) + return c:IsSetCard(SET_WITCHCRAFTER) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.thsptg(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 c=e:GetHandler() + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + 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) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.thspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and 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 "Witchcrafter" 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_WITCHCRAFTER) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end diff --git a/pre-release/c100455024.lua b/pre-release/c100455024.lua new file mode 100644 index 0000000000..a4db64f719 --- /dev/null +++ b/pre-release/c100455024.lua @@ -0,0 +1,82 @@ +--ウィッチクラフト・マルカ +--Witchcrafter Marka +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can Tribute this card from your hand or field; add 1 "Witchcrafter" Field or Continuous Spell 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|LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfTribute) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If a face-up "Witchcrafter" monster(s) you control leaves the field by an opponent's card effect, while this card is in your GY: You can Special Summon this card (but banish it when it leaves the field), and if you do, Tribute 1 monster your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE+CATEGORY_RELEASE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_LEAVE_FIELD) + 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_WITCHCRAFTER} +function s.thfilter(c) + return c:IsSetCard(SET_WITCHCRAFTER) and (c:IsFieldSpell() or c:IsContinuousSpell()) 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.spconfilter(c,tp,opp) + return c:IsPreviousSetCard(SET_WITCHCRAFTER) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) + and c:IsPreviousControler(tp) and c:IsReasonPlayer(opp) and c:IsReason(REASON_EFFECT) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spconfilter,1,nil,tp,1-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) + and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE) +end +function s.spop(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 + --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 + if Duel.SpecialSummonComplete()==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local g=Duel.SelectMatchingCard(tp,Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Release(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100455025.lua b/pre-release/c100455025.lua new file mode 100644 index 0000000000..420ef57cee --- /dev/null +++ b/pre-release/c100455025.lua @@ -0,0 +1,80 @@ +--大魔女サンドリヨン +--Witchcrafter Madame Rilliona +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: "Witchcrafter Madame Verre" + 2 Spellcaster monsters + Fusion.AddProcMixN(c,true,true,21522601,1,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),2) + --If this card is Fusion Summoned: You can Special Summon up to 3 Level 7 or lower "Witchcrafter" monsters with different Attributes from each other from your hand and/or Deck, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Fusion Monsters + 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:SetTarget(s.witchsptg) + e1:SetOperation(s.witchspop) + c:RegisterEffect(e1) + --During your End Phase, if this card is in your GY: You can reveal 1 Spell in your hand; Special Summon this card in Defense Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetCost(Cost.Reveal(Card.IsSpell)) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) +end +s.listed_names={21522601} --"Witchcrafter Madame Verre" +s.listed_series={SET_WITCHCRAFTER} +s.material_setcode=SET_WITCHCRAFTER +function s.witchspfilter(c,e,tp) + return c:IsLevelBelow(7) and c:IsSetCard(SET_WITCHCRAFTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.witchsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.witchspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.witchspop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + local g=Duel.GetMatchingGroup(s.witchspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) + if ft>0 and #g>0 then + local attr_count=g:GetClassCount(Card.GetAttribute) + ft=math.min(ft,3,attr_count) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dpcheck(Card.GetAttribute),1,tp,HINTMSG_SPSUMMON) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Fusion 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 c:IsLocation(LOCATION_EXTRA) and not c:IsFusionMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +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) +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_DEFENSE) + end +end \ No newline at end of file diff --git a/pre-release/c100455026.lua b/pre-release/c100455026.lua new file mode 100644 index 0000000000..5e625b2a35 --- /dev/null +++ b/pre-release/c100455026.lua @@ -0,0 +1,107 @@ +--ウィッチクラフト・ピューピルズ +--Witchcrafter Pupils +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Witchcrafter" monster + 1 Spellcaster monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_WITCHCRAFTER),aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) + --During the Main or Battle Phase (Quick Effect): You can activate 1 of these effects; + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function() return Duel.IsMainPhase() or Duel.IsBattlePhase() end) + e1:SetCost(Cost.Choice( + --● Add 1 "Witchcrafter" Spell from your Deck to your hand + {aux.TRUE,aux.Stringid(id,2),function(e,tp) return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end}, + --● Reveal 1 "Witchcrafter" Normal or Quick-Play Spell in your hand; apply that Spell's activation effect + {Cost.Reveal(s.revealfilter,nil,1,1,function(e,tp,og) e:GetChainData().revealed_card=og:GetFirst() end),aux.Stringid(id,3),nil} + ) + ) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e1) + --During your End Phase: You can return 1 of your banished "Witchcrafter" cards 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_O) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetTarget(s.rtgtg) + e2:SetOperation(s.rtgop) + c:RegisterEffect(e2) +end +s.listed_series={SET_WITCHCRAFTER} +s.material_setcode=SET_WITCHCRAFTER +function s.thfilter(c) + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsSpell() and c:IsAbleToHand() +end +function s.revealfilter(c) + return c:IsSetCard(SET_WITCHCRAFTER) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) + and c:CheckActivateEffect(true,true,false)~=nil + and c:CheckActivateEffect(true,true,false):GetOperation()~=nil +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local cd=e:GetChainData() + if cd.cost_choice==1 then + --● Add 1 "Witchcrafter" Spell from your Deck to your hand + e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + elseif cd.cost_choice==2 then + --● Reveal 1 "Witchcrafter" Normal or Quick-Play Spell in your hand; apply that Spell's activation effect + e:SetCategory(0) + local te,ceg,cep,cev,cre,cr,crp=cd.revealed_card:CheckActivateEffect(true,true,true) + Duel.ClearTargetCard() + local tg=te:GetTarget() + e:SetProperty(te:GetProperty()) + e:SetLabel(te:GetLabel()) + e:SetLabelObject(te:GetLabelObject()) + if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end + e:SetCategory(0) + Duel.ClearOperationInfo(0) + cd.pupils_target_effect=te + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local cd=e:GetChainData() + if cd.cost_choice==1 then + --● Add 1 "Witchcrafter" Spell from your Deck to your hand + 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 + elseif cd.cost_choice==2 then + --● Reveal 1 "Witchcrafter" Normal or Quick-Play Spell in your hand; apply that Spell's activation effect + local te=cd.pupils_target_effect + if not te then return end + local op=te:GetOperation() + if op then + op(e,tp,eg,ep,ev,re,r,rp) + end + end +end +function s.rtgfilter(c) + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsFaceup() and c:IsAbleToGrave() +end +function s.rtgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.rtgfilter,tp,LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED) +end +function s.rtgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.rtgfilter,tp,LOCATION_REMOVED,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoGrave(g,REASON_EFFECT) + end +end diff --git a/pre-release/c100455027.lua b/pre-release/c100455027.lua new file mode 100644 index 0000000000..5997da6221 --- /dev/null +++ b/pre-release/c100455027.lua @@ -0,0 +1,97 @@ +--ウィッチクラフト・セレブレーション +--Witchcrafter Celebration +--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) + 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 your End Phase, if you control a "Witchcrafter" monster, while this card is in your GY: You can add this card to your 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:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WITCHCRAFTER),tp,LOCATION_MZONE,0,1,nil) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_WITCHCRAFTER} +function s.desfilter(c,opp) + return (c:IsSetCard(SET_WITCHCRAFTER) and c:IsMonster() and c:IsFaceup()) or c:IsControler(opp) +end +function s.matfilter(c) + return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToDeck() and c:IsFaceup() +end +function s.fextra(e,tp,mg) + return Duel.GetMatchingGroup(aux.NecroValleyFilter(s.matfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,1-tp) + --● Destroy 1 "Witchcrafter" monster you control and 1 card your opponent controls + local b1=#g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),0) + --● Fusion Summon 1 "Witchcrafter" Fusion Monster from your Extra Deck, by shuffling Spellcaster monsters from your GY and/or banishment into the Deck + local fusion_params={ + fusfilter=function(c) return c:IsSetCard(SET_WITCHCRAFTER) end, + matfilter=aux.FALSE, + extrafil=s.fextra, + extraop=Fusion.ShuffleMaterial + } + local b2=Fusion.SummonEffTG(fusion_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,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_DESTROY) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,0) + elseif op==2 then + e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,1) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Destroy 1 "Witchcrafter" monster you control and 1 card your opponent controls + local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,nil,1-tp) + if #g<2 or g:GetClassCount(Card.GetControler)<2 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_DESTROY) + if #sg==2 then + Duel.HintSelection(sg) + Duel.Destroy(sg,REASON_EFFECT) + end + elseif op==2 then + --● Fusion Summon 1 "Witchcrafter" Fusion Monster from your Extra Deck, by shuffling Spellcaster monsters from your GY and/or banishment into the Deck + local fusion_params={ + fusfilter=function(c) return c:IsSetCard(SET_WITCHCRAFTER) end, + matfilter=aux.FALSE, + extrafil=s.fextra, + extraop=Fusion.ShuffleMaterial + } + Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) + 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,chk) + 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/c100455028.lua b/pre-release/c100455028.lua new file mode 100644 index 0000000000..02d9a8a290 --- /dev/null +++ b/pre-release/c100455028.lua @@ -0,0 +1,61 @@ +--魔女の聖夜行 +--Witchcrafter Walpurgis +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --During your Main Phase: You can add 1 "Witchcrafter" monster from your Deck to your hand, then discard 1 card. You can only use this effect of "Witchcrafter Walpurgis" once per turn + 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_FZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --During your turn, if you would discard to activate the effect of a "Witchcrafter" monster you control, you can send 1 "Witchcrafter" Spell/Trap from your Deck to the GY instead, except "Witchcrafter Walpurgis" + local e2=Witchcrafter.CreateCostReplaceEffect(c) + e2:SetRange(LOCATION_FZONE) + e2:SetCondition(s.repcon) + e2:SetOperation(s.repop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_WITCHCRAFTER} +function s.thfilter(c) + return c:IsSetCard(SET_WITCHCRAFTER) 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) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,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.repcostfilter(c) + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToGraveAsCost() +end +function s.repcon(e) + local tp=e:GetHandlerPlayer() + return Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(s.repcostfilter,tp,LOCATION_DECK,0,1,nil) +end +function s.repop(base,extracon,e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.repcostfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_COST) + end +end diff --git a/pre-release/c100455029.lua b/pre-release/c100455029.lua new file mode 100644 index 0000000000..4484e74821 --- /dev/null +++ b/pre-release/c100455029.lua @@ -0,0 +1,69 @@ +--ウィッチクラフト・ディストーション +--Witchcrafter Distortion +local s,id=GetID() +function s.initial_effect(c) + --When a Spell/Trap Card, or monster effect, is activated and you control a Level 5 or higher "Witchcrafter" monster: Negate the activation, and if you do, destroy that card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.negcon) + e1:SetTarget(s.negtg) + e1:SetOperation(s.negop) + c:RegisterEffect(e1) + --If this card is in your GY, except the turn it was sent there: You can banish it; add 1 Level 5 or higher Spellcaster monster from your Deck to your hand, 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_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(aux.exccon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_WITCHCRAFTER} +function s.negconfilter(c) + return c:IsLevelAbove(5) and c:IsSetCard(SET_WITCHCRAFTER) and c:IsFaceup() +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.negconfilter,tp,LOCATION_MZONE,0,1,nil) and (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsMonsterEffect()) + and Duel.IsChainNegatable(ev) +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 +function s.thfilter(c) + return c:IsLevelAbove(5) and c:IsRace(RACE_SPELLCASTER) 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 then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) + end +end \ No newline at end of file diff --git a/pre-release/c100455047.lua b/pre-release/c100455047.lua new file mode 100644 index 0000000000..85de65c112 --- /dev/null +++ b/pre-release/c100455047.lua @@ -0,0 +1,114 @@ +--破械式鬼シャラ +--Unchained Ogre Shara +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --During the Main Phase (Quick Effect): You can discard this card; Special Summon 1 Fiend monster from your hand, then destroy 1 card you control + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.handsptg) + e1:SetOperation(s.handspop) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e1) + --If a card(s) on the field is destroyed by card effect, except "Unchained Ogre Shara", or by battle, while this card is in your GY: You can Special Summon this card (but place it on the bottom of the Deck when it leaves the field) or add it to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.selfspthcon) + e2:SetTarget(s.selfspthtg) + e2:SetOperation(s.selfspthop) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.handspfilter(c,e,tp) + return c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.handsptg(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 Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,c,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) + if #g>0 then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + end +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 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil) + if #dg>0 then + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end +end +function s.selfspthconfilter(c) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end +function s.selfspthcon(e,tp,eg,ep,ev,re,r,rp) + if eg:IsContains(e:GetHandler()) or not eg:IsExists(s.selfspthconfilter,1,nil) then return false end + if r&REASON_BATTLE>0 then return true end + if Duel.IsChainSolving() then + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) and rc:IsFaceup() then + return not rc:IsCode(id) + else + local code1,code2=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2) + return code1~=id and code2~=id + end + else + if re then + return not re:GetHandler():IsCode(id) + else + return not eg:GetFirst():IsPreviousCodeOnField(id) + end + end + return false +end +function s.selfspthtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.selfspthop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + aux.ToHandOrElse(c,tp, + function() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + end, + function() + if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --Place it on the bottom of the Deck when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_DECKBOT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e1,true) + end + end, + aux.Stringid(id,3) + ) +end \ No newline at end of file diff --git a/pre-release/c100455048.lua b/pre-release/c100455048.lua new file mode 100644 index 0000000000..2cba4eccd9 --- /dev/null +++ b/pre-release/c100455048.lua @@ -0,0 +1,109 @@ +--破械式鬼シュマ +--Unchained Ogre Shma +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is Normal Summoned: You can Special Summon 1 Level 4 or lower "Unchained" monster from your Deck, except "Unchained Ogre Shma", then destroy 1 card you control, also you cannot Special Summon for the rest of this turn, except Fiend monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + 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.lv4sptg) + e1:SetOperation(s.lv4spop) + c:RegisterEffect(e1) + --If this card on the field is destroyed by card effect, except "Unchained Ogre Shma", or by battle: You can Special Summon 1 "Unchained" monster from your hand or Deck, except "Unchained Ogre Shma" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.handdeckspcon) + e2:SetTarget(s.handdecksptg) + e2:SetOperation(s.handdeckspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_UNCHAINED} +s.listed_names={id} +function s.lv4spfilter(c,e,tp) + return c:IsLevelBelow(4) and s.unchainedspfilter(c,e,tp) +end +function s.unchainedspfilter(c,e,tp) + return c:IsSetCard(SET_UNCHAINED) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.lv4sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.lv4spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.lv4spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.lv4spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil) + if #dg>0 then + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end + end + local c=e:GetHandler() + --You cannot Special Summon for the rest of this turn, except Fiend 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:IsRaceExcept(RACE_FIEND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_FIEND) end) +end +function s.handdeckspcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not (c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE|REASON_EFFECT)) then return false end + if c:IsReason(REASON_BATTLE) then + return true + elseif c:IsReason(REASON_EFFECT) then + local rc=re:GetHandler() + if Duel.IsChainSolving() then + if rc==c then + return not c:IsPreviousCodeOnField(id) + else + if rc:IsRelateToEffect(re) and rc:IsFaceup() then + return not rc:IsCode(id) + else + local code1,code2=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2) + return code1~=id and code2~=id + end + end + else + return not rc:IsCode(id) + end + end + return false +end +function s.handdecksptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.unchainedspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.handdeckspop(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.unchainedspfilter,tp,LOCATION_HAND|LOCATION_DECK,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/c100455049.lua b/pre-release/c100455049.lua new file mode 100644 index 0000000000..2f2b3bd790 --- /dev/null +++ b/pre-release/c100455049.lua @@ -0,0 +1,101 @@ +--破械冥官カムラ +--Unchained Malevolent Magistrate Kamura +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can target up to 3 cards you control; destroy them, and if you do, Special Summon this card from your hand, then you can apply any of the following effects, in sequence, based on the original types of the destroyed cards + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW+CATEGORY_POSITION) + 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) + --If this card on the field is destroyed by card effect: You can destroy all monsters on the field + 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) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.descon) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and Duel.GetMZoneCount(tp,chkc)>0 end + local c=e:GetHandler() + local mmz_rescon=aux.ChkfMMZ(1) + local g=Duel.GetTargetGroup(nil,tp,LOCATION_ONFIELD,0,nil) + if chk==0 then return #g>0 and aux.SelectUnselectGroup(g,e,tp,1,3,mmz_rescon,0) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + local tg=aux.SelectUnselectGroup(g,e,tp,1,3,mmz_rescon,1,tp,HINTMSG_DESTROY,mmz_rescon) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,#tg,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + if tg:IsExists(Card.IsMonsterCard,1,nil) then + Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + end + if tg:IsExists(Card.IsSpellCard,1,nil) then + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_EITHER,LOCATION_MZONE) + end + if tg:IsExists(Card.IsTrapCard,1,nil) then + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) + end +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==0 or Duel.Destroy(tg,REASON_EFFECT)==0 then return end + local c=e:GetHandler() + local og=Duel.GetOperatedGroup() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --● Monster: Draw 1 card + if og:IsExists(Card.IsMonsterCard,1,nil) and Duel.IsPlayerCanDraw(tp,1) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end + --● Spell: Change the battle position of 1 monster on the field + if og:IsExists(Card.IsSpellCard,1,nil) and Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) + end + end + --● Trap: Destroy 1 other card on the field + if og:IsExists(Card.IsTrapCard,1,nil) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) + and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + end + end +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 end + local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end diff --git a/pre-release/c100455050.lua b/pre-release/c100455050.lua new file mode 100644 index 0000000000..17516915d1 --- /dev/null +++ b/pre-release/c100455050.lua @@ -0,0 +1,100 @@ +--破械焔魔天ヤマ +--Unchained Enma Lord Yama +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ monsters, including an "Unchained Soul" monster + Link.AddProcedure(c,nil,2,4,s.matcheck) + --During your End Phase: You can target up to 2 Fiend monsters in your GY that were destroyed and sent there this turn; Special Summon them, but you cannot Special Summon, except Fiend monsters, while you control either of those face-up monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_PHASE+PHASE_END) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If this card on the field would be destroyed by battle or card effect, you can destroy 1 face-up card on either field 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,1}) + e2:SetTarget(s.desreptg) + e2:SetOperation(s.desrepop) + c:RegisterEffect(e2) +end +s.listed_series={SET_UNCHAINED_SOUL} +s.material_setcode=SET_UNCHAINED_SOUL +function s.matcheck(g,lc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_UNCHAINED_SOUL,lc,sumtype,tp) +end +function s.spfilter(c,e,tp,turn_count) + return c:IsRace(RACE_FIEND) and c:IsReason(REASON_DESTROY) and c:GetTurnID()==turn_count and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local turn_count=Duel.GetTurnCount() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp,turn_count) end + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if chk==0 then return ft>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,turn_count) end + ft=math.min(ft,2) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp,turn_count) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==0 or (#tg==2 and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)) then return end + if #tg==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + tg=tg:FilterSelect(tp,Card.IsCanBeSpecialSummoned,1,1,nil,e,0,tp,false,false) + else + for tc in tg:Iter() do + if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) + --ou cannot Special Summon, except Fiend monsters, while you control either of those face-up monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_MZONE) + e1:SetAbsoluteRange(tp,1,0) + e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) + e1:SetTarget(function(e,c) return c:IsRaceExcept(RACE_FIEND) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + end + Duel.SpecialSummonComplete() + end +end +function s.repfilter(c,e) + return c:IsFaceup() and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED|STATUS_BATTLE_DESTROYED) +end +function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsReason(REASON_REPLACE) and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,e) end + if Duel.SelectEffectYesNo(tp,c,96) then + Duel.Hint(HINT_CARD,0,id) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) + local tc=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c,e):GetFirst() + Duel.HintSelection(tc) + e:SetLabelObject(tc) + tc:SetStatus(STATUS_DESTROY_CONFIRMED,true) + return true + else + return false + end +end +function s.desrepop(e,tp,eg,ep,ev,re,r,rp) + local tc=e:GetLabelObject() + tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/pre-release/c100455051.lua b/pre-release/c100455051.lua new file mode 100644 index 0000000000..6ab0509dae --- /dev/null +++ b/pre-release/c100455051.lua @@ -0,0 +1,114 @@ +--破械神雙ラギア +--Unchained Soul Rage Abominator +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ monsters, including a Fiend monster + Link.AddProcedure(c,nil,2,3,s.matcheck) + --If your opponent Special Summons a monster(s) face-up: You can target 1 of them; destroy 1 Fiend monster you control, and if you do, negate the targeted monster's effects until the end of this turn + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_CUSTOM+id) + e1a:SetRange(LOCATION_MZONE) + e1a:SetCountLimit(1,{id,0}) + e1a:SetTarget(s.distg) + e1a:SetOperation(s.disop) + e1a:SetLabelObject(Group.CreateGroup()) + c:RegisterEffect(e1a) + --Keep track of monsters the opponent Special Summoned face-up + local e1b=Effect.CreateEffect(c) + e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + e1b:SetRange(LOCATION_MZONE) + e1b:SetLabelObject(e1a) + e1b:SetOperation(s.regop) + c:RegisterEffect(e1b) + --When a monster effect is activated on the field and you control a Link-4 or higher "Unchained" Link Monster (Quick Effect): You can banish this card from your GY; destroy the monster that activated that effect + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.descon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_UNCHAINED} +function s.matcheck(g,lc,sumtype,tp) + return g:IsExists(Card.IsRace,1,nil,RACE_FIEND,lc,sumtype,tp) +end +function s.disfilter(c,e,opp) + return c:IsSummonPlayer(opp) and c:IsNegatableMonster() and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_MZONE) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsDamageStep() then return end + local tg=eg:Filter(s.disfilter,nil,e,1-tp) + if #tg>0 then + for tc in tg:Iter() do + tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) + end + local g=e:GetLabelObject():GetLabelObject() + if Duel.GetCurrentChain()==0 then g:Clear() end + g:Merge(tg) + g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) + e:GetLabelObject():SetLabelObject(g) + Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) + end +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local opp=1-tp + local g=e:GetLabelObject():Filter(s.disfilter,nil,e,opp) + if chkc then return g:IsContains(chkc) and s.disfilter(chkc,e,opp) end + local dg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_FIEND),tp,LOCATION_MZONE,0,nil) + if chk==0 then return #dg>0 and #g>0 end + local tc=nil + if #g>1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + tc=g:Select(tp,1,1,nil):GetFirst() + else + tc=g:GetFirst() + end + Duel.SetTargetCard(tc) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsRace,RACE_FIEND),tp,LOCATION_MZONE,0,1,1,nil) + if #g==0 then return end + Duel.HintSelection(g) + if Duel.Destroy(g,REASON_EFFECT)==0 then return end + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --Negate the targeted monster's effects until the end of this turn + tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) + end +end +function s.desconfilter(c) + return c:IsLinkAbove(4) and c:IsSetCard(SET_UNCHAINED) and c:IsFaceup() +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return re:IsMonsterEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE and re:GetHandler():IsRelateToEffect(re) + and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local rc=re:GetHandler() + rc:CreateEffectRelation(e) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,rc,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) then + Duel.Destroy(rc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100455052.lua b/pre-release/c100455052.lua new file mode 100644 index 0000000000..7a9dc4af06 --- /dev/null +++ b/pre-release/c100455052.lua @@ -0,0 +1,77 @@ +--破械転生 +--Reincarnation of the Unchained +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can add 1 "Unchained" Spell (except "Reincarnation of the Unchained") or 1 "Abomination's Prison" 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_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) + --Once per turn: You can target up to 3 "Unchained" cards in your GY, except "Reincarnation of the Unchained"; shuffle them into the Deck, then you can destroy other cards you control up to the number returned + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) +end +s.listed_series={SET_UNCHAINED} +s.listed_names={27412542,id} --"Abomination's Prison" +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thfilter(c) + return ((c:IsSetCard(SET_UNCHAINED) and c:IsSpell() and not c:IsCode(id)) or c:IsCode(27412542)) and c:IsAbleToHand() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if 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 g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end +function s.tdfilter(c) + return c:IsSetCard(SET_UNCHAINED) and not c:IsCode(id) and c:IsAbleToDeck() +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.tdfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,3,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD) +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_DECKSHUFFLE,REASON_EFFECT)>0 then + Duel.ShuffleDeck(tp) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + local returned_count=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) + if returned_count>0 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,exc) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,returned_count,exc) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + end + end +end \ No newline at end of file diff --git a/pre-release/c100455053.lua b/pre-release/c100455053.lua new file mode 100644 index 0000000000..526d411cf9 --- /dev/null +++ b/pre-release/c100455053.lua @@ -0,0 +1,81 @@ +--破械習合 +--Unchained Syncretism +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Target 2 face-up monsters on the field, including an "Unchained Soul" Link Monster you control; immediately after this effect resolves, Link Summon 1 Fiend monster using only those 2 monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.linksumtg) + e1:SetOperation(s.linksumop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --If this Set card is destroyed by card effect: You can Special Summon 1 "Unchained" monster from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.deckspcon) + e2:SetTarget(s.decksptg) + e2:SetOperation(s.deckspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_UNCHAINED_SOUL,SET_UNCHAINED} +function s.unchainedsoulfilter(c,tp) + return c:IsSetCard(SET_UNCHAINED_SOUL) and c:IsLinkMonster() and c:IsControler(tp) +end +function s.linkfilter(c,mg) + return c:IsRace(RACE_FIEND) and c:IsLinkSummonable(nil,mg,2,2) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(s.unchainedsoulfilter,1,nil,tp) and Duel.IsExistingMatchingCard(s.linkfilter,tp,LOCATION_EXTRA,0,1,nil,sg) +end +function s.linksumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetTargetGroup(aux.FaceupFilter(Card.IsCanBeLinkMaterial),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_TARGET) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.linkmatimmunefilter(c,e) + return c:IsFaceup() and c:IsCanBeLinkMaterial() and not c:IsImmuneToEffect(e) +end +function s.linksumop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e):Match(s.linkmatimmunefilter,nil,e) + if #tg==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local link=Duel.SelectMatchingCard(tp,s.linkfilter,tp,LOCATION_EXTRA,0,1,1,nil,tg):GetFirst() + if link then + Duel.LinkSummon(tp,link,tg,tg,2,2) + end + end +end +function s.deckspcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) and c:IsReason(REASON_EFFECT) +end +function s.deckspfilter(c,e,tp) + return c:IsSetCard(SET_UNCHAINED) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.deckspop(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.deckspfilter,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 \ No newline at end of file diff --git a/pre-release/c100456001.lua b/pre-release/c100456001.lua new file mode 100644 index 0000000000..ea7a85a8e0 --- /dev/null +++ b/pre-release/c100456001.lua @@ -0,0 +1,72 @@ +--ダークティラノ +--Dark Tyranno +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Can attack directly if all monsters your opponent controls are in Defense Position + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_DIRECT_ATTACK) + e1:SetCondition(s.directattackcond) + c:RegisterEffect(e1) + --During your Main Phase, if a Spell Card or effect was activated this turn: You can 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(function() return Duel.GetCustomActivityCount(id,0,ACTIVITY_CHAIN)>0 or Duel.GetCustomActivityCount(id,1,ACTIVITY_CHAIN)>0 end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsSpellEffect() end) + --If this card is sent to the GY: You can add 1 Level 8 or higher Dinosaur monster from your Deck to your hand, then you can Special Summon it if your opponent controls a monster + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+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.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +function s.directattackcond(e) + local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),0,LOCATION_MZONE) + return #g==g:FilterCount(Card.IsDefensePos,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:IsLevelAbove(8) and c:IsRace(RACE_DINOSAUR) 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_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +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 then + Duel.ConfirmCards(1-tp,sc) + Duel.ShuffleHand(tp) + if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100456002.lua b/pre-release/c100456002.lua new file mode 100644 index 0000000000..94d4b5f369 --- /dev/null +++ b/pre-release/c100456002.lua @@ -0,0 +1,94 @@ +--アルカナフォースⅩⅡ-THE HANGED MAN +--Arcana Force XII - The Hangman +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --When a card or effect is activated (Quick Effect): You can reveal this card in your hand; Special Summon 1 "Arcana Force" monster from your hand in Defense Position. You can only use this effect of "Arcana Force XII - The Hangman" once per turn + 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_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If this card is Summoned: Toss a coin + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_COIN+CATEGORY_DESTROY+CATEGORY_DAMAGE) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetTarget(s.cointg) + e2a:SetOperation(s.coinop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_FLIP_SUMMON_SUCCESS) + c:RegisterEffect(e2b) + local e2c=e2b:Clone() + e2c:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2c) +end +s.listed_series={SET_ARCANA_FORCE} +s.toss_coin=true +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ARCANA_FORCE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +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_DEFENSE) + end +end +function s.cointg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) + local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) + if g:GetClassCount(Card.GetControler)==2 or Duel.IsPlayerAffectedByEffect(tp,CARD_LIGHT_BARRIER) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_MZONE) + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_EITHER,0) +end +function s.coinop(e,tp,eg,ep,ev,re,r,rp) + local coin=nil + if Duel.IsPlayerAffectedByEffect(tp,CARD_LIGHT_BARRIER) then + local b1=Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,nil) + local b2=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) + local op=Duel.SelectEffect(tp, + {b1,aux.GetCoinEffectHintString(COIN_HEADS)}, + {b2,aux.GetCoinEffectHintString(COIN_TAILS)}) + if not op then return end + coin=op==1 and COIN_HEADS or COIN_TAILS + else + coin=Duel.TossCoin(tp,1) + end + if coin==COIN_HEADS then + --● Heads: Destroy 1 monster you control, and if you do, take damage equal to its original ATK + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local sc=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + if Duel.Destroy(sc,REASON_EFFECT)>0 then + Duel.Damage(tp,sc:GetTextAttack(),REASON_EFFECT) + end + elseif coin==COIN_TAILS then + --● Tails: Destroy 1 monster your opponent controls, and if you do, inflict damage to your opponent equal to its original ATK + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local sc=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + if Duel.Destroy(sc,REASON_EFFECT)>0 then + Duel.Damage(1-tp,sc:GetTextAttack(),REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c100456003.lua b/pre-release/c100456003.lua new file mode 100644 index 0000000000..4fe408beaa --- /dev/null +++ b/pre-release/c100456003.lua @@ -0,0 +1,82 @@ +--光幻獣 カンデラード +--Candelato, the Beast of Light +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Gains 1000 ATK/DEF for each card in your hand + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_SINGLE) + e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1a:SetCode(EFFECT_UPDATE_ATTACK) + e1a:SetRange(LOCATION_MZONE) + e1a:SetValue(function(e,c) return 1000*Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0) end) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e1b) + --You can discard 2 other cards; Special Summon this card from your hand, then you can add 1 card from your Deck to your hand that has a coin tossing effect + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(Cost.Discard(nil,true,2)) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --When a card or effect is activated that includes an effect that adds a card(s) from the Deck to the hand (Quick Effect): You can negate that effect + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DISABLE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.discon) + e3:SetTarget(s.distg) + e3:SetOperation(s.disop) + c:RegisterEffect(e3) +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_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thfilter(c) + return c.toss_coin 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 + 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 g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,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.discon(e,tp,eg,ep,ev,re,r,rp) + if not Duel.IsChainDisablable(ev) then return false end + if re:IsHasCategory(CATEGORY_SEARCH) or re:IsHasCategory(CATEGORY_DRAW) then return true end + local found_opinfo,group_opinfo,_,_,locations_opinfo=Duel.GetOperationInfo(ev,CATEGORY_TOHAND) + local found_popinfo,group_popinfo,_,_,locations_popinfo=Duel.GetPossibleOperationInfo(ev,CATEGORY_TOHAND) + if not (found_opinfo or found_popinfo) then return false end + local g=Group.CreateGroup() + if group_opinfo then g:Merge(group_opinfo) end + if group_popinfo then g:Merge(group_popinfo) end + return (((locations_opinfo or 0)|(locations_popinfo or 0))&LOCATION_DECK)>0 or (#g>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK)) +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) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + Duel.NegateEffect(ev) +end \ No newline at end of file diff --git a/pre-release/c100456004.lua b/pre-release/c100456004.lua new file mode 100644 index 0000000000..2ba2793cae --- /dev/null +++ b/pre-release/c100456004.lua @@ -0,0 +1,83 @@ +--プラズマ戦士エイトム +--Plasma Warrior Eitom +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeSpecialSummoned() + --Must be Special Summoned (from your hand or GY) by Tributing 1 Level 7 or higher monster. You can only Special Summon "Plasma Warrior Eitom" once per turn this way + 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_HAND|LOCATION_GRAVE) + e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e0:SetCondition(s.spcon) + e0:SetTarget(s.sptg) + e0:SetOperation(s.spop) + c:RegisterEffect(e0) + --Once per turn: You can send 1 "Magnet Warrior" or "Magna Warrior" monster from your Deck to the GY, except "Plasma Warrior Eitom"; for the rest of this turn, this card's original ATK becomes 1500, also it can attack directly + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(function(e) local c=e:GetHandler() return not (c:IsBaseAttack(1500) and c:IsHasEffect(EFFECT_DIRECT_ATTACK)) end) + e1:SetCost(s.atkcost) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) +end +s.listed_series={SET_MAGNET_WARRIOR,SET_MAGNA_WARRIOR} +s.listed_names={id} +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,Card.IsLevelAbove,1,false,1,true,c,tp,nil,false,nil,7) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,Card.IsLevelAbove,1,1,false,true,true,c,nil,nil,false,nil,7) + if g and #g>0 then + e:SetLabelObject(g) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if g then + Duel.Release(g,REASON_COST) + end +end +function s.atkcostfilter(c) + return c:IsSetCard({SET_MAGNET_WARRIOR,SET_MAGNA_WARRIOR}) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToGraveAsCost() +end +function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.atkcostfilter,tp,LOCATION_DECK,0,1,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.atkcostfilter,tp,LOCATION_DECK,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + if c:IsFaceup() then + --For the rest of this turn, this card's original ATK becomes 1500 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetValue(1500) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + end + --Also it can attack directly + local e2=Effect.CreateEffect(c) + e2:SetDescription(3205) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_DIRECT_ATTACK) + e2:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e2) + end +end \ No newline at end of file diff --git a/pre-release/c100456005.lua b/pre-release/c100456005.lua new file mode 100644 index 0000000000..e6b88656bd --- /dev/null +++ b/pre-release/c100456005.lua @@ -0,0 +1,125 @@ +--白騎士団のロード +--White Knight Lord +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You can banish 3 monsters from your GY; Special Summon this card from your hand, then you can apply 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --When an attack is declared involving this card and an opponent's monster: Change that opponent's monster's ATK to 0 + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_ATTACK_ANNOUNCE) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(s.atkcon) + e2:SetTarget(s.atktg) + e2:SetOperation(s.atkop) + c:RegisterEffect(e2) + --If this card in its owner's possession is destroyed by an opponent's card: Inflict 1000 damage to your opponent + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_DAMAGE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e3:SetCode(EVENT_DESTROYED) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) end) + e3:SetTarget(s.damtg) + e3:SetOperation(s.damop) + c:RegisterEffect(e3) +end +s.listed_series={SET_WHITE_KNIGHT_NIGHT} +s.listed_names={49306994} --"White Veil" +function s.spcostfilter(c) + return c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) + if chk==0 then return #g>=3 and aux.SelectUnselectGroup(g,e,tp,3,3,aux.ChkfMMZ(1),0) end + local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) + Duel.Remove(sg,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) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_WHITE_KNIGHT_NIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.thfilter(c) + return c:IsCode(49306994) 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 b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) + local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) + if not ((b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(id,3))) then return end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,4)}, + {b2,aux.Stringid(id,5)}) + if op==1 then + --● Special Summon 1 "White Knight" or "White Night" monster from your hand or Deck + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + --● Add 1 "White Veil" from your Deck to your hand + 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.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end + end +end +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetHandler():GetBattleTarget() + return bc and bc:IsFaceup() and bc:IsControler(1-tp) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local bc=e:GetHandler():GetBattleTarget() + e:SetLabelObject(bc) + bc:CreateEffectRelation(e) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetLabelObject() + if bc and bc:IsRelateToEffect(e) and bc:IsFaceup() and bc:IsControler(1-tp) then + --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) + e1:SetValue(0) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + bc:RegisterEffect(e1) + end +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(1-tp) + Duel.SetTargetParam(1000) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) +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/c100456006.lua b/pre-release/c100456006.lua new file mode 100644 index 0000000000..a5da627ee1 --- /dev/null +++ b/pre-release/c100456006.lua @@ -0,0 +1,94 @@ +--不死のデスロード +--Invincible Demise Lord +--scripted by pyrQ +local s,id=GetID() +local CARD_SLASH_DRAW=71344451 +function s.initial_effect(c) + --During the End Phase, if a monster(s) was destroyed by battle this turn: You can Special Summon this card from your hand or GY, and if "Invincible Demise Lord" was destroyed by battle this turn, this card's original ATK becomes 3000, also it cannot be destroyed by card effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_PHASE+PHASE_END) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function() return Duel.HasFlagEffect(0,id) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --During your Main Phase: You can reveal cards in your Deck, including "Slash Draw", equal to the number of cards your opponent controls +1 and place those revealed cards on top of the Deck in any order + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) + --Keep track of monsters destroyed by battle + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_BATTLE_DESTROYED) + ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) + if eg:IsExists(Card.IsPreviousCodeOnField,1,nil,id) then + Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) + end + end) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_names={id,CARD_SLASH_DRAW} +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.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) + and Duel.HasFlagEffect(1,id) then + --If "Invincible Demise Lord" was destroyed by battle this turn, this card's original ATK becomes 3000, also it cannot be destroyed by card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetValue(3000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + local e2=Effect.CreateEffect(c) + e2:SetDescription(3001) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2:SetValue(1) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e2) + end + Duel.SpecialSummonComplete() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local deck_count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) + return deck_count>1 and deck_count>=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)+1 + and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,CARD_SLASH_DRAW) + end +end +function s.rescon(sg,e,tp,mg) + local res=sg:IsExists(Card.IsCode,1,nil,CARD_SLASH_DRAW) + return res,not res +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,CARD_SLASH_DRAW) then return end + local reveal_count=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)+1 + local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0) + if #g1 then Duel.SortDecktop(tp,tp,reveal_count) end + end +end \ No newline at end of file diff --git a/pre-release/c100456007.lua b/pre-release/c100456007.lua new file mode 100644 index 0000000000..5115f30d7d --- /dev/null +++ b/pre-release/c100456007.lua @@ -0,0 +1,65 @@ +--E・HERO クレイ・ガードマン +--Elemental HERO Clay Guardian +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Elemental HERO" monster + 1 Warrior monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ELEMENTAL_HERO),aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR)) + --If this card is Special Summoned: You can Special Summon 1 "Elemental HERO" monster from your Deck, then if your opponent controls a card, you can inflict 400 damage to your opponent for each, 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_SPECIAL_SUMMON+CATEGORY_DAMAGE) + 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.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Other "Elemental HERO" monsters you control cannot be destroyed by battle or card effects + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_FIELD) + e2a:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2a:SetRange(LOCATION_MZONE) + e2a:SetTargetRange(LOCATION_MZONE,0) + e2a:SetTarget(function(e,c) return c:IsSetCard(SET_ELEMENTAL_HERO) and c~=e:GetHandler() end) + e2a:SetValue(1) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e2b) +end +s.listed_series={SET_HERO,SET_ELEMENTAL_HERO} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ELEMENTAL_HERO) 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) + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400*Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + local dam=400*Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) + Duel.BreakEffect() + Duel.Damage(1-tp,dam,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(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 c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_HERO) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c100456008.lua b/pre-release/c100456008.lua new file mode 100644 index 0000000000..f43f0236b6 --- /dev/null +++ b/pre-release/c100456008.lua @@ -0,0 +1,71 @@ +--ドールハンマー +--Doll Hammer +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Target 1 monster you control; destroy it, and if you do, draw 2 cards, then you can change the battle position of 1 monster your opponent controls + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW+CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --If a monster(s) is Special Summoned from your GY while this card is in your GY: You can add this card to your 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_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +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) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) + and Duel.IsPlayerCanDraw(tp,2) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,0) +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.Draw(tp,2,REASON_EFFECT)>0 + and Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,0,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSITION) + local g=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) + end + end +end +function s.thconfilter(c,tp) + return c:IsSummonLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return 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/c100456009.lua b/pre-release/c100456009.lua new file mode 100644 index 0000000000..2629683af7 --- /dev/null +++ b/pre-release/c100456009.lua @@ -0,0 +1,89 @@ +--速攻召喚 +--Quick Summon +local s,id=GetID() +function s.initial_effect(c) + --Immediately after this effect resolves, Normal Summon/Set 1 monster. When you do, if your opponent controls a monster, you can Normal Summon a Level 5 or higher monster without Tributing + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SUMMON) + 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, except the turn it was sent there: You can banish it; add 1 Level 5 or higher monster that can be Normal Summoned/Set from your Deck or GY to your hand, then immediately after this effect resolves, Tribute Summon it. You can only use this effect of "Quick Summon" once per turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(aux.exccon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +function s.nsfilter(c,no_tribute_chk,handler) + if c:CanSummonOrSet(true,nil) then return true end + if c:IsLevelAbove(5) and c:IsLocation(LOCATION_HAND) and no_tribute_chk then + --When you do, if your opponent controls a monster, you can Normal Summon a Level 5 or higher monster without Tributing + local e1=Effect.CreateEffect(handler) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_SUMMON_PROC) + e1:SetCondition(function(e,c,minc) return c==nil or minc==0 end) + c:RegisterEffect(e1) + local res=c:IsSummonable(true,nil) + e1:Reset() + return res + end + return false +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local no_tribute_chk=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,no_tribute_chk,e:GetHandler()) + end + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local no_tribute_chk=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,no_tribute_chk,c):GetFirst() + if not sc then return end + if sc:IsLevelAbove(5) and sc:IsLocation(LOCATION_HAND) and no_tribute_chk then + --When you do, if your opponent controls a monster, you can Normal Summon a Level 5 or higher monster without Tributing + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_SUMMON_PROC) + e1:SetCondition(function(e,c,minc) return c==nil or minc==0 end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end + Duel.SummonOrSet(tp,sc,true,nil) +end +function s.thfilter(c,tp) + return c:IsLevelAbove(5) and c:IsSummonableCard() and Duel.CheckTribute(c,c:GetTributeRequirement()) and c:CanSummonOrSet(true,nil,1) + and Duel.IsPlayerCanSummon(tp,SUMMON_TYPE_TRIBUTE,c) 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|LOCATION_GRAVE,0,1,nil,tp) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() + if not sc then return end + if sc:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(sc) end + if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 then + if sc:IsPreviousLocation(LOCATION_DECK) then Duel.ConfirmCards(1-tp,sc) end + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.SummonOrSet(tp,sc,true,nil,1) + end +end \ No newline at end of file diff --git a/pre-release/c100456010.lua b/pre-release/c100456010.lua new file mode 100644 index 0000000000..10de671a75 --- /dev/null +++ b/pre-release/c100456010.lua @@ -0,0 +1,62 @@ +--D-バースト +--D - Burst +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Target 1 face-up Spell you control; destroy it, and if you do, draw 1 card, then if you control a "Destiny HERO" monster, you can Special Summon 1 "Destiny HERO" monster from your hand, GY, or banishment + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW+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.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --At the end of the Damage Step, if a monster equipped with an Equip Card, or "Destiny HERO - Dogma", attacked: You can banish this card from your GY; that monster can 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_series={SET_DESTINY_HERO} +s.listed_names={17132130} --"Destiny HERO - Dogma" +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsSpell() and chkc:IsFaceup() and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSpell),tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsPlayerCanDraw(tp,1) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSpell),tp,LOCATION_ONFIELD,0,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DESTINY_HERO) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +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.Draw(tp,1,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DESTINY_HERO),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.ShuffleHand(tp) + 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,nil,e,tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + local ac=Duel.GetAttacker() + return (ac:HasEquipCard() or ac:IsCode(17132130)) and ac:CanChainAttack() +end \ No newline at end of file diff --git a/pre-release/c100457001.lua b/pre-release/c100457001.lua new file mode 100644 index 0000000000..b21bffe0c0 --- /dev/null +++ b/pre-release/c100457001.lua @@ -0,0 +1,85 @@ +--古の秘儀 +--Ancient Secrets +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Normal Monster from your hand, Deck, or GY in Defense Position (if you Special Summon from the Deck, it must be Level 4 or lower), or if you control a Normal Monster Card, you can apply 1 of these effects instead + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_DRAW) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.acttg) + e1:SetOperation(s.actop) + c:RegisterEffect(e1) +end +function s.spfilter(c,e,tp) + return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + and (c:IsLevelBelow(4) or not c:IsLocation(LOCATION_DECK)) +end +function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk) + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + local monster_card_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOriginalType,TYPE_NORMAL),tp,LOCATION_ONFIELD,0,1,nil) + if chk==0 then + if mmz_chk and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) then return true end + return monster_card_chk and (Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 or Duel.IsPlayerCanDraw(tp,2) + or (mmz_chk and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,0,tp,false,false))) + end + if not monster_card_chk then + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_EITHER,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) + Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,1,tp,2) +end +function s.actop(e,tp,eg,ep,ev,re,r,rp) + local op=nil + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOriginalType,TYPE_NORMAL),tp,LOCATION_ONFIELD,0,1,nil) then + local b1=mmz_chk and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) + local b2=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 + local b3=Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) + local b4=Duel.IsPlayerCanDraw(tp,2) + local b5=mmz_chk and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(Card.IsCanBeSpecialSummoned),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,0,tp,false,false) + op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)}, + {b4,aux.Stringid(id,4)}, + {b5,aux.Stringid(id,5)}) + else + op=1 + end + if op==1 then + --Special Summon 1 Normal Monster from your hand, Deck, or GY in Defense Position (if you Special Summon from the Deck, it must be Level 4 or lower) + if not mmz_chk then return end + 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,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + elseif op==2 then + --● Destroy all monsters your opponent controls + local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end + elseif op==3 then + --● Destroy all Spells/Traps your opponent controls + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end + elseif op==4 then + --● Draw 2 cards + Duel.Draw(tp,2,REASON_EFFECT) + elseif op==5 then + --● Special Summon 1 monster from either GY to your field + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsCanBeSpecialSummoned),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100457002.lua b/pre-release/c100457002.lua new file mode 100644 index 0000000000..3c635a57b8 --- /dev/null +++ b/pre-release/c100457002.lua @@ -0,0 +1,96 @@ +--デーモンの根源 +--Archfiend's Origin +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is in your hand: You can Tribute 1 other "Archfiend" monster from your hand or field; Special Summon this card + 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) + --If this card is Normal or Special Summoned: You can Special Summon 1 Level 6 Fiend monster with 2500 ATK from your hand, Deck, or GY + 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:SetTarget(s.lv6fiendsptg) + e2a:SetOperation(s.lv6fiendspop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --When your opponent activates a monster effect and you control "Summoned Skull" (Quick Effect): You can negate the activation, and if you do, destroy that card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + 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,2}) + e3:SetCondition(s.negcon) + e3:SetTarget(s.negtg) + e3:SetOperation(s.negop) + c:RegisterEffect(e3) +end +s.listed_series={SET_ARCHFIEND} +s.listed_names={CARD_SUMMONED_SKULL} +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,true,aux.ReleaseCheckMMZ,c,SET_ARCHFIEND) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,true,aux.ReleaseCheckMMZ,c,SET_ARCHFIEND) + Duel.Release(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.lv6fiendspfilter(c,e,tp) + return c:IsLevel(6) and c:IsRace(RACE_FIEND) and c:IsAttack(2500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.lv6fiendsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.lv6fiendspfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) +end +function s.lv6fiendspop(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.lv6fiendspfilter),tp,LOCATION_HAND|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 +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return ep==1-tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SUMMONED_SKULL),tp,LOCATION_ONFIELD,0,1,nil) +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/c100457003.lua b/pre-release/c100457003.lua new file mode 100644 index 0000000000..1d1cd76c35 --- /dev/null +++ b/pre-release/c100457003.lua @@ -0,0 +1,73 @@ +--魔降雷 +--Makourai, the Lightning Strike +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Target 1 "Archfiend" monster you control; it gains 600 ATK, then you can destroy all monsters your opponent controls with lower original ATK than that monster's ATK + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(TIMING_DAMAGE_STEP) + c:RegisterEffect(e1) + --During your Main Phase: You can banish this card from your GY, then target 1 Level 6 Fiend monster with 2500 ATK in your GY; add it to your 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:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ARCHFIEND} +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsSetCard(SET_ARCHFIEND) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_ARCHFIEND),tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_ARCHFIEND),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE) +end +function s.desfilter(c,atk) + return c:GetBaseAttack()=prev_atk and Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil,atk) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil,atk) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + end +end +function s.thfilter(c) + return c:IsLevel(6) and c:IsRace(RACE_FIEND) and c:IsAttack(2500) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end + 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 +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100457102.lua b/pre-release/c100457102.lua new file mode 100644 index 0000000000..0e92b4a7ca --- /dev/null +++ b/pre-release/c100457102.lua @@ -0,0 +1,95 @@ +--聖なる心のバリア -マインドフォース- +--Mind Mirror Force +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If your opponent controls 5 or more face-up cards, this card's activation and effect cannot be negated, also you can activate this card the turn it was Set + c:RegisterFlagEffect(id,0,0,1) + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD) + ge1:SetCode(EFFECT_CANNOT_INACTIVATE) + ge1:SetValue(function(e,ch) + local trig_eff=Chain.GetTriggeringEffect(ch) + local trig_player=Chain.GetTriggeringPlayer(ch) + return trig_eff:GetHandler():HasFlagEffect(id) and Duel.GetMatchingGroupCount(Card.IsFaceup,trig_player,0,LOCATION_ONFIELD,nil)>=5 + end) + Duel.RegisterEffect(ge1,0) + local ge2=ge1:Clone() + ge2:SetCode(EFFECT_CANNOT_DISEFFECT) + Duel.RegisterEffect(ge2,0) + end) + 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:SetCondition(function(e) + return Duel.GetMatchingGroupCount(Card.IsFaceup,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,nil)>=5 + end) + c:RegisterEffect(e0) + --At any of the following timings: Negate the effects of as many face-up cards your opponent controls as possible, and if you do, destroy them, also your monsters cannot attack directly until the end of the next turn after this card resolves + --● When the monster your opponent controls with the highest ATK (even if tied) declares an attack + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,1)) + e1a:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) + e1a:SetType(EFFECT_TYPE_ACTIVATE) + e1a:SetCode(EVENT_ATTACK_ANNOUNCE) + e1a:SetCondition(s.condition1) + e1a:SetTarget(s.target) + e1a:SetOperation(s.activate) + c:RegisterEffect(e1a) + --● When your opponent activates a monster effect that would destroy a card(s) on the field + local e1b=e1a:Clone() + e1b:SetCode(EVENT_CHAINING) + e1b:SetCondition(s.condition2) + c:RegisterEffect(e1b) + --● When your opponent activates a monster effect in the hand or field during your turn + local e1c=e1b:Clone() + e1c:SetCondition(s.condition3) + c:RegisterEffect(e1c) +end +function s.condition1(e,tp,eg,ep,ev,re,r,rp) + local bc=Duel.GetAttacker() + return bc:IsControler(1-tp) and Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack):IsContains(bc) +end +function s.condition2(e,tp,eg,ep,ev,re,r,rp) + --Avoid prompting which effect to activate if both 'condition1' and 'condition2' are true + local event_chk,event_g,event_p,event_v,event_reff,event_r,event_rp=Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE,true) + if event_chk and s.condition1(e,tp,event_g,event_p,event_v,event_reff,event_r,event_rp) then return false end + if not (rp==1-tp and re:IsMonsterEffect()) then return false end + local opinfo_chk,opinfo_g=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) + return opinfo_chk and opinfo_g and opinfo_g:IsExists(Card.IsOnField,1,nil) +end +function s.condition3(e,tp,eg,ep,ev,re,r,rp) + --Avoid prompting which effect to activate if both 'condition2' and 'condition3' are true + if s.condition2(e,tp,eg,ep,ev,re,r,rp) then return false end + return Duel.IsTurnPlayer(tp) and rp==1-tp and re:IsMonsterEffect() and Chain.IsTriggeringLocation(ev,LOCATION_HAND|LOCATION_MZONE) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil):Match(Card.IsCanBeDisabledByEffect,nil,e) + if #g>0 then + for nc in g:Iter() do + --Negate the effects of as many face-up cards your opponent controls as possible, and if you do, destroy them + nc:NegateEffects(c) + end + Duel.AdjustInstantly() + Duel.Destroy(g,REASON_EFFECT) + end + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2),nil,2) + --Your monsters cannot attack directly until the end of the next turn after this card resolves + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) +end diff --git a/pre-release/c101304081.lua b/pre-release/c101304081.lua new file mode 100644 index 0000000000..91bfce8642 --- /dev/null +++ b/pre-release/c101304081.lua @@ -0,0 +1,90 @@ +--JP name +--Gaming Gamer GG +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 Machine monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),4,2) + --If this card is Special Summoned: You can change all monsters your opponent controls to Attack Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.postg) + e1:SetOperation(s.posop) + c:RegisterEffect(e1) + --If your opponent has a monster in their field or GY: You can detach 1 material from this card; send 1 Machine monster from your Deck/Extra Deck to the GY, then you can apply this effect: ● Choose 1 Machine Xyz Monster in your GY, and this card's name becomes that monster's name until the End Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(Card.IsMonster,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end) + e2:SetCost(Cost.DetachFromSelf(1)) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(aux.AND(Card.IsDefensePos,Card.IsCanChangePosition),tp,0,LOCATION_MZONE,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,tp,POS_FACEUP_ATTACK) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(aux.AND(Card.IsDefensePos,Card.IsCanChangePosition),tp,0,LOCATION_MZONE,nil) + if #g>0 then + Duel.ChangePosition(g,POS_FACEUP_ATTACK) + end +end +function s.tgfilter(c) + return 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|LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.namefilter(c,current_name) + return c:IsRace(RACE_MACHINE) and c:IsXyzMonster() and not c:IsCode(current_name) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local code=c:GetCode() + 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 c:IsRelateToEffect(e) and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.namefilter,tp,LOCATION_GRAVE,0,1,nil,code) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local xyz=Duel.SelectMatchingCard(tp,s.namefilter,tp,LOCATION_GRAVE,0,1,1,nil,code):GetFirst() + if not xyz then return end + Duel.HintSelection(xyz) + Duel.BreakEffect() + --This card's name becomes that monster's name until the End Phase + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(xyz:GetCode()) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + --Reset the card's name manually during the End Phase + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,4)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetOperation(function(e) + e1:Reset() + Duel.HintSelection(c) + Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) + end) + e2:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e2) + end +end \ No newline at end of file diff --git a/pre-release/c101304082.lua b/pre-release/c101304082.lua new file mode 100644 index 0000000000..86d0064ba8 --- /dev/null +++ b/pre-release/c101304082.lua @@ -0,0 +1,65 @@ +--JP name +--Fata Dragna +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2 monsters with the same Type and Attribute, but different Levels + Fusion.AddProcMixN(c,true,true,s.matfilter,2) + --Your opponent cannot target Fusion Monsters you control with card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsFusionMonster() end) + e1:SetValue(aux.tgoval) + c:RegisterEffect(e1) + --If this card is sent to the GY as material for a Fusion Summon: You can Special Summon 1 Fusion Monster from your Extra Deck in Defense Position (but negate its effects, also return it to the Extra Deck during the End Phase), also for the rest of this turn, you cannot Special Summon from the Extra Deck, except Fusion Monsters. You can only use this effect of "Fata Dragna" once per turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_TOEXTRA) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_BE_MATERIAL) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and (r&REASON_FUSION)==REASON_FUSION end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.matfilter(c,fc,sumtype,sump,sub,matg,sg) + return c:HasLevel() and (not sg or sg:FilterCount(aux.TRUE,c)==0 or (sg:IsExists(Card.IsAttribute,1,c,c:GetAttribute(fc,sumtype,sump),fc,sumtype,sump) + and sg:IsExists(Card.IsRace,1,c,c:GetRace(fc,sumtype,sump),fc,sumtype,sump) + and not sg:IsExists(Card.IsLevel,1,c,c:GetLevel()))) +end +function s.spfilter(c,e,tp) + return c:IsFusionMonster() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +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) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then + --Negate its effects + sc:NegateEffects(c) + --Return it to the Extra Deck during the End Phase + aux.DelayedOperation(sc,PHASE_END,id,e,tp,function(ag) Duel.SendtoDeck(ag,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end,nil,0,0,aux.Stringid(id,1)) + end + Duel.SpecialSummonComplete() + --For the rest of this turn, you cannot Special Summon from the Extra Deck, except Fusion 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:IsFusionMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c101304083.lua b/pre-release/c101304083.lua new file mode 100644 index 0000000000..3d64c4e2fd --- /dev/null +++ b/pre-release/c101304083.lua @@ -0,0 +1,97 @@ +--JP name +--Shade the Obscure +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --You cannot Pendulum Summon, except Pendulum Monsters (this effect cannot be negated) + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_PZONE) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c,tp,sumtype,sumpos) return not c:IsPendulumMonster() and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end) + c:RegisterEffect(e1) + --If a monster(s) with 1000 ATK or less is Special Summoned (except during the Damage Step): You can return this card to the hand. You can only use this effect of "Shade the Obscure" once per turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_PZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(aux.FaceupFilter(Card.IsAttackBelow,1000),1,nil) end) + e2:SetTarget(s.rthtg) + e2:SetOperation(s.rthop) + c:RegisterEffect(e2) + --If you have a card in your Pendulum Zone and this card is in your hand: You can 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_HAND) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)>0 end) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) + --You can pay 1000 LP; destroy 1 Pendulum Monster Card in your hand or face-up field, then you can add 1 Pendulum Monster from your Deck to your face-up Extra Deck + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_DESTROY+CATEGORY_TOEXTRA) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,{id,2}) + e4:SetCost(Cost.PayLP(1000)) + e4:SetTarget(s.destg) + e4:SetOperation(s.desop) + c:RegisterEffect(e4) +end +function s.rthtg(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.rthop(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 +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.desfilter(c) + return c:IsOriginalType(TYPE_PENDULUM) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) + if #g==0 then return end + if g:GetFirst():IsOnField() then Duel.HintSelection(g) end + if Duel.Destroy(g,REASON_EFFECT)==0 then return end + local dg=Duel.GetMatchingGroup(aux.AND(Card.IsPendulumMonster,Card.IsAbleToExtra),tp,LOCATION_DECK,0,nil) + if #dg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT) + local sg=dg:Select(tp,1,1,nil) + if #sg>0 then + Duel.BreakEffect() + Duel.SendtoExtraP(sg,tp,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101304084.lua b/pre-release/c101304084.lua new file mode 100644 index 0000000000..572d35d11a --- /dev/null +++ b/pre-release/c101304084.lua @@ -0,0 +1,72 @@ +--JP name +--VIP Whale +--scripted by pyrQ +local s,id=GetID() +local COUNTER_VIP=0x21a +function s.initial_effect(c) + c:EnableCounterPermit(COUNTER_VIP) + --You can Tribute additional monsters when you Tribute Summon this card face-up + aux.AddNormalSummonProcedure(c,true,true,2,12,SUMMON_TYPE_TRIBUTE,aux.Stringid(id,0)) + --If this card is Tribute Summoned: You can place VIP Counters on this card equal to the number of monsters Tributed for its Tribute Summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_COUNTER) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsTributeSummoned() end) + e1:SetTarget(s.countertg) + e1:SetOperation(s.counterop) + c:RegisterEffect(e1) + --When your opponent activates a card or effect (Quick Effect): You can remove 1 VIP Counter from this card; toss a coin and call it. If you call it right, negate that effect. If you call it wrong, this card's original ATK becomes halved until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_COIN+CATEGORY_DISABLE+CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e2:SetCost(Cost.RemoveCounterFromSelf(COUNTER_VIP,1)) + e2:SetTarget(s.cointg) + e2:SetOperation(s.coinop) + c:RegisterEffect(e2) +end +s.counter_place_list={COUNTER_VIP} +s.toss_coin=true +function s.countertg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local trib_monsters_count=c:GetMaterialCount() + if chk==0 then return trib_monsters_count>0 and c:IsCanAddCounter(COUNTER_VIP,trib_monsters_count) end + e:SetLabel(trib_monsters_count) + Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,trib_monsters_count,tp,COUNTER_VIP) +end +function s.counterop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + c:AddCounter(COUNTER_VIP,e:GetLabel()) + end +end +function s.cointg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,0) +end +function s.coinop(e,tp,eg,ep,ev,re,r,rp) + if Duel.CallCoin(tp) then + --If you call it right, negate that effect + Duel.NegateEffect(ev) + else + --If you call it wrong, this card's original ATK becomes halved until the end of this turn + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card's original ATK becomes halved until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetValue(c:GetBaseAttack()/2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + end + end +end \ No newline at end of file diff --git a/pre-release/c101304085.lua b/pre-release/c101304085.lua new file mode 100644 index 0000000000..9ddb4e84a4 --- /dev/null +++ b/pre-release/c101304085.lua @@ -0,0 +1,101 @@ +--JP name +--Genia of the Ring +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card is in your hand: You can target 1 face-up monster on the field; Special Summon this card, also that target becomes a Spellcaster monster. The next time that target would be destroyed by card effect this turn, it is not destroyed, also you cannot Special Summon from the Extra Deck 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: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) + --If this card is Tributed, or banished, to activate a Spellcaster monster's effect: You can add this card to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_RELEASE) + e2a:SetCountLimit(1,{id,1}) + e2a:SetCondition(s.thcon) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_REMOVE) + c:RegisterEffect(e2b) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + 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 + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRaceExcept(RACE_SPELLCASTER) then + --That target becomes a Spellcaster monster + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_RACE) + e1:SetValue(RACE_SPELLCASTER) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + --The next time that target would be destroyed by card effect this turn, it is not destroyed + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e2:SetCountLimit(1) + e2:SetValue(function(e,re,r,rp) if r&REASON_EFFECT>0 then e:Reset() return true end end) + e2:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e2) + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Spellcaster monsters + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,3)) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e3:SetTargetRange(1,0) + e3:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and c:IsRaceExcept(RACE_SPELLCASTER) end) + e3:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e3,tp) +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + if not (e:GetHandler():IsReason(REASON_COST) and re and re:IsActivated() and re:IsMonsterEffect()) then return false end + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) and rc:IsFaceup() then + return rc:IsRace(RACE_SPELLCASTER) + else + return Duel.GetChainInfo(0,CHAININFO_TRIGGERING_RACE)&RACE_SPELLCASTER>0 + 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/c101304086.lua b/pre-release/c101304086.lua new file mode 100644 index 0000000000..e4834cbe90 --- /dev/null +++ b/pre-release/c101304086.lua @@ -0,0 +1,77 @@ +--JP name +--Checkker +--Scripted by The Razgriz +local s,id=GetID() +local TOKEN_IRON_RUBBLE=id+100 +function s.initial_effect(c) + --Cannot be Normal Summoned if you control a monster + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_CANNOT_SUMMON) + e0:SetCondition(function(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>0 end) + c:RegisterEffect(e0) + --You can Tribute this card; Special Summon 1 Machine monster from your Deck whose ATK equals its own DEF, but return it to the hand during the End Phase + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfTribute) + e1:SetTarget(s.spfromdecktg) + e1:SetOperation(s.spfromdeckop) + c:RegisterEffect(e1) + --You can banish this card from your GY and discard 1 card; Special Summon 1 "Iron Rubble Token" (Machine/EARTH/Level 1/ATK 0/DEF 0), but it cannot be used as material for a Fusion, Synchro, or Link Summon + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.AND(Cost.SelfBanish,Cost.Discard())) + e2:SetTarget(s.tokensptg) + e2:SetOperation(s.tokenspop) + c:RegisterEffect(e2) +end +s.listed_names={TOKEN_IRON_RUBBLE} +function s.spfromdeckfilter(c,e,tp) + return c:IsRace(RACE_MACHINE) and c:IsDefense(c:GetAttack()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spfromdecktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfromdeckfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spfromdeckop(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.spfromdeckfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then + --Return it to the hand during the End Phase + aux.DelayedOperation(g,PHASE_END,id,e,tp,function(ag) Duel.SendtoHand(ag,nil,REASON_EFFECT) end,nil,0,0,aux.Stringid(id,2)) + end +end +function s.tokensptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_IRON_RUBBLE,0,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH) end + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) +end +function s.tokenspop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_IRON_RUBBLE,0,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH) then + local token=Duel.CreateToken(tp,TOKEN_IRON_RUBBLE) + if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then + --It cannot be used as material for a Fusion, Synchro, or Link Summon + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_BE_MATERIAL) + e1:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_LINK)) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + token:RegisterEffect(e1) + end + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/pre-release/c101304087.lua b/pre-release/c101304087.lua new file mode 100644 index 0000000000..55bebb5817 --- /dev/null +++ b/pre-release/c101304087.lua @@ -0,0 +1,81 @@ +--JP name +--Rustin Mammoth +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card is in your hand: You can banish Machine Link Monsters from your Extra Deck whose combined Link Ratings equal exactly 5; Special Summon this card + 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.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --You can target 1 card you control and 1 card your opponent controls; return them to the hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND) + e2a:SetType(EFFECT_TYPE_IGNITION) + e2a:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2a:SetRange(LOCATION_MZONE) + e2a:SetCountLimit(1,{id,1}) + e2a:SetCondition(aux.NOT(s.rthquickcon)) + e2a:SetTarget(s.rthtg) + e2a:SetOperation(s.rthop) + c:RegisterEffect(e2a) + --This is a Quick Effect if this card is linked to a Link-3 or higher Machine Link Monster + local e2b=e2a:Clone() + e2b:SetType(EFFECT_TYPE_QUICK_O) + e2b:SetCode(EVENT_FREE_CHAIN) + e2b:SetCondition(s.rthquickcon) + e2b:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2b) +end +function s.spcostfilter(c) + return c:IsRace(RACE_MACHINE) and c:IsLinkMonster() and c:IsAbleToRemoveAsCost() +end +function s.rescon(sg,e,tp,mg) + return sg:GetSum(Card.GetLink)==5 +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_EXTRA,0,nil) + if chk==0 then return #g>0 and aux.SelectUnselectGroup(g,e,tp,1,5,s.rescon,0) end + local rg=aux.SelectUnselectGroup(g,e,tp,1,5,s.rescon,1,tp,HINTMSG_REMOVE,s.rescon) + Duel.Remove(rg,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)>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.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetTargetGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + if chk==0 then return #g>=2 and 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 +function s.rthquickconfilter(c,ec,lg) + return c:IsLinkAbove(3) and c:IsRace(RACE_MACHINE) and c:IsFaceup() and (c:GetLinkedGroup():IsContains(ec) or lg:IsContains(c)) +end +function s.rthquickcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return Duel.IsExistingMatchingCard(s.rthquickconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) +end \ No newline at end of file diff --git a/pre-release/c101304088.lua b/pre-release/c101304088.lua new file mode 100644 index 0000000000..3926dd36bb --- /dev/null +++ b/pre-release/c101304088.lua @@ -0,0 +1,90 @@ +--JP name +--Officiating Reverie +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is in your hand: You can discard 1 other card; Special Summon this card + 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.Discard(nil,true)) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --If an Xyz Monster(s) is sent to the GY, while this card is in your GY (except during the Damage Step): You can banish this card; Special Summon 1 Zombie monster from your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.gyspcon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.gysptg) + e2:SetOperation(s.gyspop) + c:RegisterEffect(e2) + --During the Standby Phase of the next turn after this card was banished: You can target 1 Zombie Xyz Monster you control; attach this banished card to it + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetRange(LOCATION_REMOVED) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e) return Duel.GetTurnCount()==e:GetHandler():GetTurnID()+1 end) + e3:SetTarget(s.attachtg) + e3:SetOperation(s.attachop) + c:RegisterEffect(e3) +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.gyspcon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsXyzMonster,1,nil) +end +function s.gyspfilter(c,e,tp) + return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.gyspfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.gyspop(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.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.xyzfilter(c,tp,hc) + return c:IsRace(RACE_ZOMBIE) and c:IsXyzMonster() and c:IsFaceup() and hc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) +end +function s.attachtg(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.xyzfilter(chkc,tp,c) end + if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c) +end +function s.attachop(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 not tc:IsImmuneToEffect(e) then + Duel.Overlay(tc,c) + end +end \ No newline at end of file diff --git a/pre-release/c101304089.lua b/pre-release/c101304089.lua new file mode 100644 index 0000000000..e58fa97726 --- /dev/null +++ b/pre-release/c101304089.lua @@ -0,0 +1,78 @@ +--JP name +--Officiator of Doom Samuel +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 6 monsters + Xyz.AddProcedure(c,nil,6,2) + --During the Main Phase (Quick Effect): You can detach 1 material from this card, then target 1 Zombie monster in your GY; Special Summon it, then you can negate the effects of 1 monster your opponent controls with ATK less than or equal to that monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetCost(Cost.DetachFromSelf(1)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e1) + --If this card is sent to the GY: You can target 1 monster in either GY; shuffle it into the Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE) +end +function s.disfilter(c,atk) + return c:IsNegatableMonster() and c:IsAttackBelow(atk) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not (tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0) then return end + local atk=tc:GetAttack() + if Duel.IsExistingMatchingCard(s.disfilter,tp,0,LOCATION_MZONE,1,nil,atk) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local sc=Duel.SelectMatchingCard(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil,atk):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + Duel.BreakEffect() + --Negate the effects of 1 monster your opponent controls with ATK less than or equal to that monster + sc:NegateEffects(e:GetHandler()) + end +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsMonster() and chkc:IsAbleToDeck() end + if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsMonster,Card.IsAbleToDeck),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,aux.AND(Card.IsMonster,Card.IsAbleToDeck),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101304090.lua b/pre-release/c101304090.lua new file mode 100644 index 0000000000..14ea17cc74 --- /dev/null +++ b/pre-release/c101304090.lua @@ -0,0 +1,74 @@ +--JP name +--GMX Partner Selandea +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can reveal this card in your hand; Special Summon 1 "GMX" monster or 1 Dinosaur monster from your hand, also you can only attack directly with "GMX" monsters for the rest of this 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_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.handsptg) + e1:SetOperation(s.handspop) + c:RegisterEffect(e1) + --If this card is Special Summoned by a monster effect: You can Special Summon 1 Level 4 or lower "GMX" or Dinosaur monster from your hand, GY, or banishment in Defense Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_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.handgybansptg) + e2:SetOperation(s.handgybanspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GMX} +function s.gmxdinospfilter(c,e,tp,pos) + return (c:IsSetCard(SET_GMX) or c:IsRace(RACE_DINOSAUR)) 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.gmxdinospfilter,tp,LOCATION_HAND,0,1,nil,e,tp,POS_FACEUP) 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 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.gmxdinospfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,POS_FACEUP) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) + --You can only attack directly with "GMX" monsters for the rest of this turn + 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_GMX) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.handgybanspfilter(c,e,tp) + return c:IsLevelBelow(4) and s.gmxdinospfilter(c,e,tp,POS_FACEUP_DEFENSE) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) +end +function s.handgybansptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.handgybanspfilter,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.handgybanspop(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.handgybanspfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end +end \ No newline at end of file diff --git a/pre-release/c101304091.lua b/pre-release/c101304091.lua new file mode 100644 index 0000000000..9ebec69fa7 --- /dev/null +++ b/pre-release/c101304091.lua @@ -0,0 +1,89 @@ +--JP name +--GMX Suppression Squad +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is in your hand and you control a "GMX" monster or a Dinosaur monster: You can Special Summon this card + 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) + --You can target 1 face-up monster on the field; excavate the top cards of your Deck until you excavate a Dinosaur monster, send that Dinosaur monster to the GY, and if you do, the targeted monster becomes a Dinosaur monster (until the end of this turn), also shuffle the rest into the Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.excavtg) + e2:SetOperation(s.excavop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GMX} +function s.spconfilter(c) + return (c:IsSetCard(SET_GMX) or c:IsRace(RACE_DINOSAUR)) and c:IsFaceup() +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return 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.tgfilter(c) + return c:IsRace(RACE_DINOSAUR) and c:IsAbleToGrave() +end +function s.excavtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and not c:IsRace(RACE_DINOSAUR) and c:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(aux.NOT(Card.IsRace),RACE_DINOSAUR),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,aux.FaceupFilter(aux.NOT(Card.IsRace),RACE_DINOSAUR),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,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 g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil) + if #g==0 then + Duel.ConfirmDecktop(tp,deck_count) + local excav_g=Duel.GetDecktopGroup(tp,deck_count) + Duel.RaiseEvent(excav_g,EVENT_CUSTOM+101304092,e,REASON_EFFECT,tp,tp,deck_count) + 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) + local excav_g=Duel.GetDecktopGroup(tp,excav_count) + Duel.RaiseEvent(excav_g,EVENT_CUSTOM+101304092,e,REASON_EFFECT,tp,tp,excav_count) + local tc=Duel.GetFirstTarget() + if Duel.SendtoGrave(sc,REASON_EFFECT|REASON_EXCAVATE) and sc:IsLocation(LOCATION_GRAVE) and tc:IsRelateToEffect(e) + and tc:IsFaceup() and not tc:IsRace(RACE_DINOSAUR) then + --The targeted monster becomes a Dinosaur monster (until the end of this turn) + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) + e1:SetCode(EFFECT_CHANGE_RACE) + e1:SetValue(RACE_DINOSAUR) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end + end + end + Duel.ShuffleDeck(tp) +end \ No newline at end of file diff --git a/pre-release/c101304092.lua b/pre-release/c101304092.lua new file mode 100644 index 0000000000..a9619bbf83 --- /dev/null +++ b/pre-release/c101304092.lua @@ -0,0 +1,86 @@ +--JP name +--Evolved Daneen +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: "Returned Dino Daneen" + 1 Dinosaur monster + Fusion.AddProcMix(c,false,false,29927283,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DINOSAUR)) + --If this card is Special Summoned: You can add 1 "GMX" card from your Deck to your hand. You can only use this effect of "Evolved Daneen" once per turn + 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:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If you excavate a card(s) by a "GMX" card effect: You can activate the following effect, based on where this card is at activation (but you can only use each effect of "Evolved Daneen" once per turn); + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_CUSTOM+101304092) + e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.effcon) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_names={29927283} --"Returned Dino Daneen" +s.listed_series={SET_GMX} +function s.thfilter(c) + return c:IsSetCard(SET_GMX) 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.effcon(e,tp,eg,ep,ev,re,r,rp) + return ep==tp and r&REASON_EFFECT>0 and Chain.IsSetcode(0,SET_GMX) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + --● Field: Gain 1500 LP + local b1=not Duel.HasFlagEffect(tp,id) and c:IsLocation(LOCATION_MZONE) + --● GY: Special Summon this card + local b2=not Duel.HasFlagEffect(tp,id+100) and c:IsLocation(LOCATION_GRAVE) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + if chk==0 then return b1 or b2 end + local op=b1 and 1 or 2 + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_RECOVER) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1500) + elseif op==2 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Field: Gain 1500 LP + Duel.Recover(tp,1500,REASON_EFFECT) + elseif op==2 then + --● GY: Special Summon this card + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + end +end diff --git a/pre-release/c101304093.lua b/pre-release/c101304093.lua new file mode 100644 index 0000000000..df8f73a087 --- /dev/null +++ b/pre-release/c101304093.lua @@ -0,0 +1,116 @@ +--JP name +--GMX - COMPREX +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "GMX" monster + 2+ Dinosaur monsters + Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DINOSAUR),2,99,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GMX)) + --Gains these effects based on the number of Dinosaur monsters used as Fusion Material for this card + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e1a:SetCode(EVENT_SPSUMMON_SUCCESS) + e1a:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) + e1a:SetOperation(s.effop) + c:RegisterEffect(e1a) + --Track the number of Dinosaur monsters used as Fusion Material for this card + local e1b=Effect.CreateEffect(c) + e1b:SetType(EFFECT_TYPE_SINGLE) + e1b:SetCode(EFFECT_MATERIAL_CHECK) + e1b:SetValue(function(e,c) e1a:SetLabel(c:GetMaterial():FilterCount(Card.IsRace,nil,RACE_DINOSAUR,c,SUMMON_TYPE_FUSION,e:GetHandlerPlayer())) end) + c:RegisterEffect(e1b) + --Once per turn, if you excavate a card(s) by a "GMX" card effect: You can destroy all other monsters on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_CUSTOM+101304092) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(s.descon) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GMX} +s.material_setcode={SET_GMX} +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local dino_mats_count=e:GetLabel() + if dino_mats_count>=3 then + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) + --● 3+: Your opponent cannot target this card with card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e1:SetValue(aux.tgoval) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end + if dino_mats_count>=4 then + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --● 4+: Can make up to 3 attacks during each Battle Phase + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_EXTRA_ATTACK) + e2:SetValue(2) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e2) + end + if dino_mats_count>=5 then + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + --● 5+: Each time your opponent Normal or Special Summons a monster(s), they lose 800 LP + local e3a=Effect.CreateEffect(c) + e3a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3a:SetCode(EVENT_SUMMON_SUCCESS) + e3a:SetRange(LOCATION_MZONE) + e3a:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) + e3a:SetOperation(s.lpop) + e3a:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3b) + end +end +function s.lpop(e,tp,eg,ep,ev,re,r,rp) + if not Duel.IsChainSolving() then + Duel.Hint(HINT_CARD,0,id) + local opp=1-tp + Duel.SetLP(opp,Duel.GetLP(opp)-800) + else + local c=e:GetHandler() + --Your opponent loses 800 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) Duel.Hint(HINT_CARD,0,id) local opp=1-tp return Duel.SetLP(opp,Duel.GetLP(opp)-800) 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) + return ep==tp and r&REASON_EFFECT>0 and Chain.IsSetcode(0,SET_GMX) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) + 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 c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,exc) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end diff --git a/pre-release/c101304094.lua b/pre-release/c101304094.lua new file mode 100644 index 0000000000..700ba1ddf0 --- /dev/null +++ b/pre-release/c101304094.lua @@ -0,0 +1,77 @@ +--JP name +--GMX 55th Experiment Report +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 Dinosaur Fusion Monster from your Extra Deck using monsters from your hand or field. If your opponent controls a monster, you can also use 1 "GMX" monster in your Deck as material + local e1=Fusion.CreateSummonEff({ + handler=c, + fusfilter=function(c) return c:IsRace(RACE_DINOSAUR) end, + extrafil=s.fextra, + extratg=s.extratg + }) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --During your Main Phase: You can banish this card from your GY; excavate the top cards of your Deck until you excavate a "GMX" card, add that "GMX" card to your hand, also shuffle the rest into the Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.excavtg) + e2:SetOperation(s.excavop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GMX} +function s.fcheck(tp,sg,fc) + return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 +end +function s.deckmatfilter(c) + return c:IsSetCard(SET_GMX) and c:IsMonster() and c:IsAbleToGrave() +end +function s.fextra(e,tp,mg) + if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 then + local eg=Duel.GetMatchingGroup(s.deckmatfilter,tp,LOCATION_DECK,0,nil) + if #eg>0 then + return eg,s.fcheck + end + end + return nil +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.thfilter(c) + return c:IsSetCard(SET_GMX) and c:IsAbleToHand() +end +function s.excavtg(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.excavop(e,tp,eg,ep,ev,re,r,rp) + local deck_count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) + if deck_count>0 then + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if #g==0 then + Duel.ConfirmDecktop(tp,deck_count) + local excav_g=Duel.GetDecktopGroup(tp,deck_count) + Duel.RaiseEvent(excav_g,EVENT_CUSTOM+101304092,e,REASON_EFFECT,tp,tp,deck_count) + 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) + local excav_g=Duel.GetDecktopGroup(tp,excav_count) + Duel.RaiseEvent(excav_g,EVENT_CUSTOM+101304092,e,REASON_EFFECT,tp,tp,excav_count) + if Duel.SendtoHand(sc,nil,REASON_EFFECT) then + Duel.ConfirmCards(1-tp,sc) + Duel.ShuffleHand(tp) + end + end + end + Duel.ShuffleDeck(tp) +end \ No newline at end of file diff --git a/pre-release/c101304095.lua b/pre-release/c101304095.lua new file mode 100644 index 0000000000..4806568873 --- /dev/null +++ b/pre-release/c101304095.lua @@ -0,0 +1,73 @@ +--JP name +--GMX Lab #5 +--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) + --Your opponent cannot activate cards or effects when you Normal or Special Summon a "GMX" monster(s) + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetRange(LOCATION_FZONE) + e1a:SetOperation(s.limop1) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + local e1c=e1a:Clone() + e1c:SetCode(EVENT_CHAIN_END) + e1c:SetOperation(s.limop2) + c:RegisterEffect(e1c) + --During your Main Phase: You can Set 1 "GMX" Spell/Trap from your Deck, except "GMX Lab #5", then place 1 card from your hand on top of the Deck. You can only use this effect of "GMX Lab #5" once per turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SET+CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_FZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GMX} +s.listed_names={id} +function s.limopfilter(c,tp) + return c:IsSetCard(SET_GMX) and c:IsFaceup() and c:IsSummonPlayer(tp) +end +function s.limop1(e,tp,eg,ep,ev,re,r,rp) + if eg and eg:IsExists(s.limopfilter,1,nil,tp) then + Duel.SetChainLimitTillChainEnd(function(re,rp,tp) return tp==rp end) + end +end +function s.limop2(e,tp,eg,ep,ev,re,r,rp) + local _,g=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true) + if g and g:IsExists(s.limopfilter,1,nil,tp) and Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) then + Duel.SetChainLimitTillChainEnd(function(re,rp,tp) return tp==rp end) + end +end +function s.setfilter(c) + return c:IsSetCard(SET_GMX) and c:IsSpellTrap() and c:IsSSetable() and not c:IsCode(id) +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) +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_DECK,0,1,1,nil) + if #g>0 and Duel.SSet(tp,g)>0 then + Duel.ShuffleDeck(tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) + if #sg>0 then + Duel.BreakEffect() + Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101304096.lua b/pre-release/c101304096.lua new file mode 100644 index 0000000000..dc9d53d490 --- /dev/null +++ b/pre-release/c101304096.lua @@ -0,0 +1,52 @@ +--JP name +--Anti-GMX Final Experiment +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate only if you control a "GMX" monster + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + e0:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GMX),tp,LOCATION_MZONE,0,1,nil) end) + c:RegisterEffect(e0) + --Once per turn, when your opponent activates a monster effect on the field (except during the Damage Step): You can excavate the top 5 cards of your Deck, then if you excavated a "GMX" card(s), negate that activated effect, also place all the excavated cards on the top or bottom of the Deck in any order + 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_SZONE) + e1:SetCountLimit(1) + e1:SetCondition(s.excavcon) + e1:SetTarget(s.excavtg) + e1:SetOperation(s.excavop) + c:RegisterEffect(e1) +end +s.listed_series={SET_GMX} +function s.excavcon(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.excavtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end + Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) +end +function s.excavop(e,tp,eg,ep,ev,re,r,rp) + local decktop5=Duel.GetDecktopGroup(tp,5) + if #decktop5==0 then return end + Duel.ConfirmDecktop(tp,5) + Duel.RaiseEvent(decktop5,EVENT_CUSTOM+101304092,e,REASON_EFFECT,tp,tp,#decktop5) + if decktop5:IsExists(Card.IsSetCard,1,nil,SET_GMX) then + Duel.BreakEffect() + Duel.NegateEffect(ev) + end + local op=0 + if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>5 then + op=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) + end + if op==0 then + Duel.SortDecktop(tp,tp,#decktop5) + else + Duel.MoveToDeckBottom(decktop5,tp) + Duel.SortDeckbottom(tp,tp,#decktop5) + end +end \ No newline at end of file diff --git a/pre-release/c101305081.lua b/pre-release/c101305081.lua new file mode 100644 index 0000000000..dee1a2a065 --- /dev/null +++ b/pre-release/c101305081.lua @@ -0,0 +1,112 @@ +--JP name +--Witness of the Ancient +--Scripted by The Razgriz +local s,id=GetID() +local TOKEN_ARC=id+100 +function s.initial_effect(c) + --If you have a Synchro Monster in your field or GY: 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 Special Summoned: You can place up to 3 Synchro Monsters with different names from your Extra Deck and/or GY in your Spell & Trap Zone as face-up Continuous Spells, and Special Summon 1 "Arc Token" (Machine/LIGHT/ATK 0/DEF 0) with a Level equal to the number placed, also for the rest of this turn, you cannot Special Summon from the Extra Deck, except Synchro Monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + 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(s.pltg) + e2:SetOperation(s.plop) + c:RegisterEffect(e2) +end +s.listed_names={TOKEN_ARC} +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSynchroMonster),tp,LOCATION_MZONE|LOCATION_GRAVE,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.plfilter(c) + return c:IsSynchroMonster() and not c:IsForbidden() +end +function s.rescon(tokenlv1chk,tokenlv2chk,tokenlv3chk,mzone_chk) + return function(sg,e,tp,mg) + if not mzone_chk then return sg:GetClassCount(Card.GetCode)==#sg end + return (#sg==1 and tokenlv1chk) + or (#sg==2 and tokenlv2chk) + or (#sg==3 and tokenlv3chk),sg:GetClassCount(Card.GetCode)~=#sg + end +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local stzone_count=Duel.GetLocationCount(tp,LOCATION_SZONE) + if stzone_count<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end + local g=Duel.GetMatchingGroup(s.plfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,nil) + if #g==0 then return false end + local tokenlv1chk=stzone_count>=1 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARC,0,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_LIGHT) + local tokenlv2chk=stzone_count>=2 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARC,0,TYPES_TOKEN,0,0,2,RACE_MACHINE,ATTRIBUTE_LIGHT) + local tokenlv3chk=stzone_count>=3 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARC,0,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_LIGHT) + return aux.SelectUnselectGroup(g,e,tp,1,math.min(3,stzone_count),s.rescon(tokenlv1chk,tokenlv2chk,tokenlv3chk,true),0) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local stzone_count=Duel.GetLocationCount(tp,LOCATION_SZONE) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.plfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,nil) + if stzone_count>0 and #g>0 then + local place_success_chk=false + local mzone_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + local tokenlv1chk=stzone_count>=1 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARC,0,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_LIGHT) + local tokenlv2chk=stzone_count>=2 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARC,0,TYPES_TOKEN,0,0,2,RACE_MACHINE,ATTRIBUTE_LIGHT) + local tokenlv3chk=stzone_count>=3 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARC,0,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_LIGHT) + local rescon=s.rescon(tokenlv1chk,tokenlv2chk,tokenlv3chk,mzone_chk) + local sg=aux.SelectUnselectGroup(g,e,tp,1,math.min(3,#g,stzone_count),rescon,1,tp,HINTMSG_TOFIELD,rescon) + for sc in sg:Iter() do + if Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then + place_success_chk=true + --Treated as a Continuous Spell + local e1=Effect.CreateEffect(c) + e1:SetCode(EFFECT_CHANGE_TYPE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) + e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TURN_SET) + sc:RegisterEffect(e1) + end + end + if place_success_chk and mzone_chk then + local token=Duel.CreateToken(tp,TOKEN_ARC) + token:Level(#sg) + Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) + end + end + --For the rest of this turn, you cannot Special Summon from the Extra Deck, except Synchro Monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e2:SetTargetRange(1,0) + e2:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) + e2:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e2,tp) +end \ No newline at end of file diff --git a/pre-release/c101305082.lua b/pre-release/c101305082.lua new file mode 100644 index 0000000000..83ddee8a82 --- /dev/null +++ b/pre-release/c101305082.lua @@ -0,0 +1,82 @@ +--JP name +--Distrust Paranoia +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Take control of all your opponent's monsters in this card's column + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_CONTROL) + 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) + --If this Set card in its owner's control has left the field by an opponent's effect, and is now in the GY or banished: You can Special Summon this card as an Effect Monster (Fiend/DARK/Level 10/ATK 4000/DEF 4000) with the following effect (this card is NOT treated as a Trap) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_LEAVE_FIELD) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --● Unaffected by your opponent's card effects activated in the same column + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_IMMUNE_EFFECT) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(function(e) + return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+1) + end) + e3:SetValue(function(e,te) + return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() and e:GetHandler():IsColumn(te:GetCardSequence(),te:GetCardControler(),te:GetCardLocation()) + end) + c:RegisterEffect(e3) +end +function s.ctrlfilter(c,tp) + return c:IsControler(1-tp) and c:IsLocation(LOCATION_MZONE) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local colg=c:GetColumnGroup():Match(s.ctrlfilter,nil,tp) + local ctrl_colg=colg:Filter(Card.IsAbleToChangeControler,nil) + local ctrl_colg_count=#ctrl_colg + if chk==0 then return #colg>0 and ctrl_colg_count==#colg and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>=ctrl_colg_count end + Duel.SetOperationInfo(0,CATEGORY_CONTROL,ctrl_colg,ctrl_colg_count,tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + local colg=c:GetColumnGroup():Match(s.ctrlfilter,nil,tp) + local ctrl_colg=colg:Filter(Card.IsAbleToChangeControler,nil) + local ctrl_colg_count=#ctrl_colg + local mzone_count=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL) + if ctrl_colg_count>0 and ctrl_colg_count==#colg and (mzone_count<=0 or mzone_count>=ctrl_colg_count) then + Duel.GetControl(ctrl_colg,tp) + end +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPreviousPosition(POS_FACEDOWN) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and rp==1-tp + and c:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) +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.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,4000,4000,10,RACE_FIEND,ATTRIBUTE_DARK) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,4000,4000,10,RACE_FIEND,ATTRIBUTE_DARK) then + c:AddMonsterAttribute(TYPE_EFFECT) + c:AssumeProperty(ASSUME_RACE,RACE_FIEND) + Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP) + c:AddMonsterAttributeComplete() + Duel.SpecialSummonComplete() + end +end \ No newline at end of file diff --git a/pre-release/c101305083.lua b/pre-release/c101305083.lua new file mode 100644 index 0000000000..071960e02e --- /dev/null +++ b/pre-release/c101305083.lua @@ -0,0 +1,89 @@ +--JP name +--Yomagna the Fire Phantom +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Must first be Special Summoned (from your hand) by shuffling 3 cards of the same type (Monster, Spell, or Trap) from your GY into the Deck/Extra Deck + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.spcon) + e0:SetTarget(s.sptg) + e0:SetOperation(s.spop) + c:RegisterEffect(e0) + --If this card is Special Summoned: You can declare 1 Monster Type; this card becomes that Type until the end of this 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_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.typechangetg) + e1:SetOperation(s.typechangeop) + c:RegisterEffect(e1) + --During your Main Phase: You can Fusion Summon 1 Fusion Monster from your Extra Deck using monsters on either field, including this card + local fusion_params={ + matfilter=Fusion.OnFieldMat, + extrafil=function(e,tp,mg) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup),tp,0,LOCATION_ONFIELD,nil) + end, + gc=Fusion.ForcedHandler + } + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + 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) +end +function s.rescon(sg,e,tp,mg) + return sg:GetClassCount(Card.GetMainCardType)==1 +end +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + local g=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_GRAVE,0,nil) + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>=3 and aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_GRAVE,0,nil) + local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TODECK,nil,nil,true) + if sg and #sg==3 then + e:SetLabelObject(sg) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local sg=e:GetLabelObject() + if sg and #sg==3 then + Duel.HintSelection(sg) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_COST) + end +end +function s.typechangetg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local declared_type=e:GetHandler():AnnounceAnotherRace(tp) + e:GetChainData().declared_type=declared_type +end +function s.typechangeop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local declared_type=e:GetChainData().declared_type + if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsRaceExcept(declared_type) then + --This card becomes that Type until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) + e1:SetCode(EFFECT_CHANGE_RACE) + e1:SetValue(declared_type) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101305084.lua b/pre-release/c101305084.lua new file mode 100644 index 0000000000..92f23c0430 --- /dev/null +++ b/pre-release/c101305084.lua @@ -0,0 +1,71 @@ +--JP name +--Thundercrash Snarecrow +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Each time a non-Thunder monster(s) is Special Summoned face-up, while this card is in the Monster Zone: That monster(s) cannot attack this turn, also destroy it during the End Phase. + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e1:SetProperty(0,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(aux.FaceupFilter(Card.IsRaceExcept,RACE_THUNDER),1,nil) + end) + e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local g=eg:Filter(aux.FaceupFilter(Card.IsRaceExcept,RACE_THUNDER),nil) + for tc in g:Iter() do + tc:CreateEffectRelation(e) + end + e:GetChainData().event_group=g + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + end) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --If this card is in your GY: You can target 1 face-up card you control; destroy it, and if you do, add this card to your hand. You can only use this effect of "Thundercrash Snarecrow' once per turn. + 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:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=e:GetChainData().event_group:Match(Card.IsRelateToEffect,nil,e) + if #g==0 then return end + local c=e:GetHandler() + for tc in g:Iter() do + --That monster(s) cannot attack this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CANNOT_ATTACK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end + --Also destroy it during the End Phase + aux.DelayedOperation(g,PHASE_END,id,e,tp,function(ag) Duel.Destroy(ag,REASON_EFFECT) end,nil,0,0,aux.Stringid(id,2),aux.Stringid(id,3)) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() 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.thop(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/c101305085.lua b/pre-release/c101305085.lua new file mode 100644 index 0000000000..01189c1bf3 --- /dev/null +++ b/pre-release/c101305085.lua @@ -0,0 +1,96 @@ +--JP name +--Mixousia the Confounder +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 Spellcaster monster + 1 non-Spellcaster monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),aux.FilterBoolFunctionEx(Card.IsRaceExcept,RACE_SPELLCASTER)) + --You can target 1 face-up monster on the field and declare 1 Attribute; it becomes that 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.fieldattrtg) + e1:SetOperation(s.fieldattrop) + c:RegisterEffect(e1) + --During your opponent's Main Phase (Quick Effect): You can Fusion Summon 1 Fusion Monster from your Extra Deck, by banishing this card you control and monsters from your field or GY as material + local fusion_params={ + handler=c, + gc=Fusion.ForcedHandler, + matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove), + extrafil=function(e,tp,mg) + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) + end + return nil + end, + extraop=Fusion.BanishMaterial + } + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsMainPhase(1-tp) end) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) + --If this card is in your GY: You can declare 1 Attribute; this card in the GY becomes that Attribute until the end of this turn + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.selfattrtg) + e3:SetOperation(s.selfattrop) + c:RegisterEffect(e3) +end +function s.fieldattrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + local declared_attribute=tc:AnnounceAnotherAttribute(tp) + e:GetChainData().declared_attribute=declared_attribute +end +function s.fieldattrop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local declared_attribute=e:GetChainData().declared_attribute + --It becomes that Attribute + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e1:SetValue(declared_attribute) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end +function s.selfattrtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local c=e:GetHandler() + local declared_attribute=c:AnnounceAnotherAttribute(tp) + e:GetChainData().declared_attribute=declared_attribute + --Operation info needed to handle the interaction with "Necrovalley" + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,LOCATION_GRAVE) +end +function s.selfattrop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + local declared_attribute=e:GetChainData().declared_attribute + --This card in the GY becomes that Attribute until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e1:SetValue(declared_attribute) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101305086.lua b/pre-release/c101305086.lua new file mode 100644 index 0000000000..583d8f2bd2 --- /dev/null +++ b/pre-release/c101305086.lua @@ -0,0 +1,84 @@ +--JP name +--Shamanite Shamanknight +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2+ Level 3 monsters + Xyz.AddProcedure(c,nil,3,2,nil,nil,Xyz.InfiniteMats) + --If this card is Xyz Summoned, or if a Trap you own is banished: You can target 1 of your banished Traps; attach it to this card + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SPSUMMON_SUCCESS) + e1a:SetCountLimit(1,{id,0}) + e1a:SetCondition(function(e) + return e:GetHandler():IsXyzSummoned() + end) + e1a:SetTarget(s.attachtg) + e1a:SetOperation(s.attachop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1b:SetCode(EVENT_REMOVE) + e1b:SetRange(LOCATION_MZONE) + e1b:SetCondition(s.attachcon) + c:RegisterEffect(e1b) + --You can detach any number of materials from this card, then target 1 DARK monster in your GY or banishment with a Level equal to the number detached; Special Summon it + 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_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.DetachChoiceFromSelf(function(e,tp) + return Duel.GetTargetGroup(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp):GetClass(Card.GetLevel) + end)) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.attachfilter(c,xyzc,tp) + return c:IsTrap() and c:IsFaceup() and c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) +end +function s.attachtg(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_REMOVED) and s.attachfilter(chkc,c,tp) end + if chk==0 then return Duel.IsExistingTarget(s.attachfilter,tp,LOCATION_REMOVED,0,1,nil,c,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACH) + Duel.SelectTarget(tp,s.attachfilter,tp,LOCATION_REMOVED,0,1,1,nil,c,tp) +end +function s.attachop(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:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) then + Duel.Overlay(c,tc) + end +end +function s.trapfilter(c,tp) + return c:IsTrap() and c:IsFaceup() and c:IsOwner(tp) +end +function s.attachcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.trapfilter,1,nil,tp) +end +function s.spfilter(c,e,tp,level) + return c:IsAttribute(ATTRIBUTE_DARK) and c:HasLevel() and (not level or c:IsLevel(level)) 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:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.spfilter(chkc,e,tp,#e:GetChainData().cost_detached_materials) 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 + local level=#e:GetChainData().cost_detached_materials + 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,level) + 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 \ No newline at end of file diff --git a/pre-release/c101305087.lua b/pre-release/c101305087.lua new file mode 100644 index 0000000000..de1a71b34f --- /dev/null +++ b/pre-release/c101305087.lua @@ -0,0 +1,76 @@ +--JP name +--Cerynemesia, Mystical Beast of the Forest +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is Normal or Special Summoned: You can banish (face-up) 1 Beast monster from your hand or face-up field until the End Phase; Special Summon 1 EARTH Beast monster from your Deck or GY, with an equal or lower Level than that monster's original Level, then your opponent can Special Summon 1 monster from their hand + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,id) + e1a:SetCost(s.spcost) + e1a:SetTarget(s.sptg) + e1a:SetOperation(s.spop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --Your opponent's monsters that can attack must attack the monster you control with the highest ATK (their choice, if tied) + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_FIELD) + e2a:SetCode(EFFECT_MUST_ATTACK) + e2a:SetRange(LOCATION_MZONE) + e2a:SetTargetRange(0,LOCATION_MZONE) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_MUST_ATTACK_MONSTER) + e2b:SetValue(function(e,c) return Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil):GetMaxGroup(Card.GetAttack):IsContains(c) end) + c:RegisterEffect(e2b) +end +function s.spcostfilter(c,e,tp) + return c:IsRace(RACE_BEAST) and c:HasLevel() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) + and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,c:GetOriginalLevel()) +end +function s.spfilter(c,e,tp,lv) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_BEAST) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local sc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() + e:GetChainData().lv=sc:GetOriginalLevel() + local return_op_function=sc:IsLocation(LOCATION_MZONE) and aux.DefaultFieldReturnOp + or function(ag) + Duel.SendtoHand(ag,nil,REASON_EFFECT) + end + --Banish (face-up) 1 Beast monster from your hand or face-up field until the End Phase + aux.RemoveUntil(sc,POS_FACEUP,REASON_COST,PHASE_END,id,e,tp,return_op_function) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,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 + local lv=e:GetChainData().lv + 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,lv) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then + local opp=1-tp + Duel.ShuffleDeck(tp) + if Duel.GetLocationCount(opp,LOCATION_MZONE,opp)>0 and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,opp,LOCATION_HAND,0,1,nil,e,0,opp,false,false) + and Duel.SelectYesNo(opp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_SPSUMMON) + local og=Duel.SelectMatchingCard(opp,Card.IsCanBeSpecialSummoned,opp,LOCATION_HAND,0,1,1,nil,e,0,opp,false,false) + if #og>0 then + Duel.BreakEffect() + Duel.SpecialSummon(og,0,opp,opp,false,false,POS_FACEUP) + end + end + end +end \ No newline at end of file diff --git a/pre-release/c101305088.lua b/pre-release/c101305088.lua new file mode 100644 index 0000000000..fcc6f75d21 --- /dev/null +++ b/pre-release/c101305088.lua @@ -0,0 +1,85 @@ +--JP name +--Imposter Shift +--scripted by pyrQ +local s,id=GetID() +local TOKEN_IMPOSTER=id+100 +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --When a monster effect that was activated on your opponent's field by targeting a card(s) on the field resolves, if any of those targets are in a different column than that opponent's monster, they can banish 1 card from their GY. If they did not, negate the activated effect + local e1=Effect.CreateEffect(c) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_SOLVING) + e1:SetRange(LOCATION_SZONE) + e1:SetCondition(s.discon) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --You can banish 1 monster from your GY; Special Summon 1 "Imposter Token" (Psychic/EARTH/ATK 800/DEF 800) with the same Level as that monster. You can only use this effect of "Imposter Shift" once per turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,id) + e2:SetCost(s.tokencost) + e2:SetTarget(s.tokentg) + e2:SetOperation(s.tokenop) + c:RegisterEffect(e2) +end +s.listed_names={TOKEN_IMPOSTER} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local opp=1-tp + local rc=re:GetHandler() + if re:IsMonsterEffect() and rc:IsRelateToEffect(re) and rc:IsControler(opp) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) + and Chain.IsTriggeringLocation(ev,LOCATION_MZONE) and Chain.IsTriggeringControler(ev,opp) and Chain.IsDisablable(ev) then + local tg=Chain.GetTargetCards(ev) + return tg and tg:IsExists(aux.AND(Card.IsRelateToEffect,Card.IsOnField),1,nil,re) + end + return false +end +function s.disconfilter(c,seq,ctrl) + return not c:IsColumn(seq,ctrl,LOCATION_MZONE) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local opp=1-tp + local tg=Chain.GetTargetCards(ev):Filter(aux.AND(Card.IsRelateToEffect,Card.IsOnField),nil,re) + if tg:IsExists(s.disconfilter,1,nil,re:GetHandler():GetSequence(),opp) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,opp,LOCATION_GRAVE,0,1,nil,opp) + and Duel.SelectYesNo(opp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,opp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(opp,Card.IsAbleToRemove,opp,LOCATION_GRAVE,0,1,1,nil,opp) + if #g>0 then + Duel.Remove(g,POS_FACEUP,REASON_EFFECT,nil,opp) + end + else + Duel.NegateEffect(ev) + end +end +function s.tokencostfilter(c,tp) + return c:HasLevel() and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0 and aux.SpElimFilter(c,true) + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_IMPOSTER,0,TYPES_TOKEN,800,800,c:GetLevel(),RACE_PSYCHIC,ATTRIBUTE_EARTH) +end +function s.tokencost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tokencostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local sc=Duel.SelectMatchingCard(tp,s.tokencostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() + Duel.Remove(sc,POS_FACEUP,REASON_COST) + e:GetChainData().token_level=sc:GetLevel() +end +function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) +end +function s.tokenop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local token_level=e:GetChainData().token_level + if Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_IMPOSTER,0,TYPES_TOKEN,800,800,token_level,RACE_PSYCHIC,ATTRIBUTE_EARTH) then + local token=Duel.CreateToken(tp,TOKEN_IMPOSTER) + token:Level(token_level) + Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101305089.lua b/pre-release/c101305089.lua new file mode 100644 index 0000000000..a1128949d8 --- /dev/null +++ b/pre-release/c101305089.lua @@ -0,0 +1,126 @@ +--JP name +--Mortilux Heruvur +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2+ Level 8 monsters + Xyz.AddProcedure(c,nil,8,2,nil,nil,Xyz.InfiniteMats) + --If a monster(s) is sent to your opponent's GY (except during the Damage Step): You can target 1 of them; attach it to this card. You can only use this effect of "Mortilux Heruvur" once per turn + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_LEAVE_GRAVE) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_CUSTOM+id) + e1a:SetRange(LOCATION_MZONE) + e1a:SetCountLimit(1,id) + e1a:SetTarget(s.attachtg) + e1a:SetOperation(s.attachop) + e1a:SetLabelObject(Group.CreateGroup()) + c:RegisterEffect(e1a) + --Keep track of monsters sent to the opponent's GY + local e1b=Effect.CreateEffect(c) + e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1b:SetCode(EVENT_TO_GRAVE) + e1b:SetRange(LOCATION_MZONE) + e1b:SetLabelObject(e1a) + e1b:SetOperation(s.regop) + c:RegisterEffect(e1b) + --This card gains effects based on the number of materials attached to it + --● 2+: Cannot be destroyed by battle or card effects + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_SINGLE) + e2a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2a:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2a:SetRange(LOCATION_MZONE) + e2a:SetCondition(s.xyzmatcountcon(2)) + e2a:SetValue(1) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e2b) + --● 3+: Your opponent cannot target cards in the GYs with card effects + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE) + e3:SetCondition(s.xyzmatcountcon(3)) + e3:SetValue(aux.tgoval) + c:RegisterEffect(e3) + --● 4+: You can detach 3 materials from this card; send 1 monster on the field to the GY + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_TOGRAVE) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetRange(LOCATION_MZONE) + e4:SetCondition(s.xyzmatcountcon(4)) + e4:SetCost(Cost.DetachFromSelf(3)) + e4:SetTarget(s.sendtogytg) + e4:SetOperation(s.sendtogyop) + c:RegisterEffect(e4) +end +function s.attachfilter(c,tp,e,xyzc) + return c:IsLocation(LOCATION_GRAVE) and c:IsMonster() and c:IsControler(1-tp) + and c:IsCanBeXyzMaterial(xyzc,tp,REASON_EFFECT) and c:IsCanBeEffectTarget(e) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsDamageStep() then return end + local c=e:GetHandler() + local tg=eg:Filter(s.attachfilter,nil,tp,e,c) + if #tg>0 then + for tc in tg:Iter() do + tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) + end + local g=e:GetLabelObject():GetLabelObject() + if Duel.GetCurrentChain()==0 then g:Clear() end + g:Merge(tg) + g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) + e:GetLabelObject():SetLabelObject(g) + Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id,e,0,tp,tp,0) + end +end +function s.attachtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local g=e:GetLabelObject():Filter(s.attachfilter,nil,tp,e,c) + if chkc then return g:IsContains(chkc) and s.attachfilter(chkc,tp,e,c) end + if chk==0 then return c:IsXyzMonster() and #g>0 end + local tc=nil + if #g==1 then + tc=g:GetFirst() + Duel.SetTargetCard(tc) + else + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACH) + tc=g:Select(tp,1,1,nil) + Duel.SetTargetCard(tc) + end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) +end +function s.attachop(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:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) then + Duel.Overlay(c,tc) + end +end +function s.xyzmatcountcon(required) + return function(e) + return e:GetHandler():GetOverlayCount()>=required + end +end +function s.sendtogytg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0) +end +function s.sendtogyop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,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/c101305090.lua b/pre-release/c101305090.lua new file mode 100644 index 0000000000..65d351ed66 --- /dev/null +++ b/pre-release/c101305090.lua @@ -0,0 +1,94 @@ +--JP name +--Angelechy Shatranga +--Scripted by Hatter +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) + --You can target 1 monster your opponent controls; banish it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.bantg) + e1:SetOperation(s.banop) + c:RegisterEffect(e1) + --If this card is placed in the Spell & Trap Zone as a Continuous Spell: You can add 1 "Angelechy" Trap from your Deck or GY to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_MOVE) + e2:SetRange(LOCATION_STZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --While this card is treated as a Continuous Spell, your opponent can only attempt to activate up to 5 monster effects per turn + local e3a=Effect.CreateEffect(c) + e3a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3a:SetCode(EVENT_CHAINING) + e3a:SetRange(LOCATION_STZONE) + e3a:SetCondition(function(e) + return e:GetHandler():IsContinuousSpell() + end) + e3a:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + if ep==tp or not re:IsMonsterEffect() then return end + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_CONTROL|RESET_PHASE|PHASE_END,0,1) + end) + c:RegisterEffect(e3a) + local e3b=Effect.CreateEffect(c) + e3b:SetType(EFFECT_TYPE_FIELD) + e3b:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e3b:SetCode(EFFECT_CANNOT_ACTIVATE) + e3b:SetRange(LOCATION_STZONE) + e3b:SetTargetRange(0,1) + e3b:SetCondition(function(e) + return e:GetHandler():HasFlagEffect(id,5) + end) + e3b:SetValue(function(e,re) + return re:IsMonsterEffect() + end) + c:RegisterEffect(e3b) +end +s.listed_series={SET_ANGELECHY} +function s.bantg(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 + 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) +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 +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return eg:IsContains(c) and not c:IsPreviousLocation(LOCATION_SZONE) +end +function s.thfilter(c) + return c:IsSetCard(SET_ANGELECHY) and c:IsTrap() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return e:GetHandler():IsContinuousSpell() + 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) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() + if sc then + if sc:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(sc) end + Duel.SendtoHand(sc,nil,REASON_EFFECT) + if sc:IsPreviousLocation(LOCATION_DECK) then Duel.ConfirmCards(1-tp,sc) end + end +end \ No newline at end of file diff --git a/pre-release/c101305091.lua b/pre-release/c101305091.lua new file mode 100644 index 0000000000..7256bf4fef --- /dev/null +++ b/pre-release/c101305091.lua @@ -0,0 +1,86 @@ +--JP name +--Angelechy Bastion +--Scripted by Hatter +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) + --You can target 1 other card in this card's column; banish it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.bantg) + e1:SetOperation(s.banop) + c:RegisterEffect(e1) + --If this card is placed in the Spell & Trap Zone as a Continuous Spell: You can place 1 "Angelechy Shatranga" from your Extra Deck in your Spell & Trap Zone as a face-up Continuous Spell + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_MOVE) + e2:SetRange(LOCATION_STZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.plcon) + e2:SetTarget(s.pltg) + e2:SetOperation(s.plop) + c:RegisterEffect(e2) + --While this card is treated as a Continuous Spell, other "Angelechy" cards on the field cannot be destroyed by your opponent's card effects + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e3:SetRange(LOCATION_STZONE) + e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) + e3:SetTarget(function(e,c) return c~=e:GetHandler() and c:IsSetCard(SET_ANGELECHY) end) + e3:SetValue(aux.indoval) + c:RegisterEffect(e3) +end +s.listed_names={101305090} --"Angelechy Shatranga" +s.listed_series={SET_ANGELECHY} +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + local colg=c:GetColumnGroup():Match(Card.IsAbleToRemove,nil) + if chkc then return colg:IsContains(chkc) and chkc~=c end + if chk==0 then return colg:IsExists(Card.IsCanBeEffectTarget,1,nil,e) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=colg:FilterSelect(tp,Card.IsCanBeEffectTarget,1,1,nil,e) + Duel.SetTargetCard(g) + 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 +function s.plcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return eg:IsContains(c) and not c:IsPreviousLocation(LOCATION_SZONE) +end +function s.plfilter(c) + return c:IsCode(101305090) and not c:IsForbidden() +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return e:GetHandler():IsContinuousSpell() + and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_EXTRA,0,1,nil) end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() + if sc and Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then + --Treated as a Continuous Spell + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_TYPE) + e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)) + sc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101305092.lua b/pre-release/c101305092.lua new file mode 100644 index 0000000000..9b370a6faf --- /dev/null +++ b/pre-release/c101305092.lua @@ -0,0 +1,94 @@ +--JP name +--Angelechy Destrier +--Scripted by Hatter +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) + --You can target 1 monster in another column; banish it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.bantg) + e1:SetOperation(s.banop) + c:RegisterEffect(e1) + --If this card is placed in the Spell & Trap Zone as a Continuous Spell: You can add 1 "Angelechy" Spell 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_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_MOVE) + e2:SetRange(LOCATION_STZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --While this card is treated as a Continuous Spell, each time your opponent activates a card or effect, inflict 500 damage to your opponent when it resolves + local e3a=Effect.CreateEffect(c) + e3a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e3a:SetCode(EVENT_CHAINING) + e3a:SetRange(LOCATION_STZONE) + e3a:SetCondition(function(e,tp,eg,ep) + return ep==1-tp and e:GetHandler():IsContinuousSpell() + end) + e3a:SetOperation(function(e) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) + end) + c:RegisterEffect(e3a) + local e3b=Effect.CreateEffect(c) + e3b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e3b:SetCode(EVENT_CHAIN_SOLVED) + e3b:SetRange(LOCATION_STZONE) + e3b:SetCondition(function(e,tp,eg,ep) + return ep==1-tp and e:GetHandler():HasFlagEffect(id) + end) + e3b:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_CARD,0,id) + Duel.Damage(1-tp,500,REASON_EFFECT) + end) + c:RegisterEffect(e3b) +end +s.listed_series={SET_ANGELECHY} +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + local colg=c:GetColumnGroup():AddCard(c) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and not colg:IsContains(chkc) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,colg) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,colg) + 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 +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return eg:IsContains(c) and not c:IsPreviousLocation(LOCATION_SZONE) +end +function s.thfilter(c) + return c:IsSetCard(SET_ANGELECHY) and c:IsSpell() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return e:GetHandler():IsContinuousSpell() + and 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/c101305093.lua b/pre-release/c101305093.lua new file mode 100644 index 0000000000..2c133633ad --- /dev/null +++ b/pre-release/c101305093.lua @@ -0,0 +1,86 @@ +--JP name +--Angelechy Enlisted +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1 non-Tuner + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,1) + --You can target 1 opponent's monster in this card's adjacent column; banish it, then change control of this card by moving it to one of your opponent's Main Monster Zones in this card's adjacent columns + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+CATEGORY_CONTROL) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.bantg) + e1:SetOperation(s.banop) + c:RegisterEffect(e1) + --If the control of this face-up card changes: Return this card to the Extra Deck, then the owner of this card Special Summons 1 "Angelechy" monster from their Extra Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_CONTROL_CHANGED) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ANGELECHY} +function s.get_adjacent_zones(c) + if not c:IsLocation(LOCATION_MZONE) then return 0 end + local zones=0 + local seq=c:GetSequence() + if seq==5 then seq=1 elseif seq==6 then seq=3 end + if seq>0 then zones=1<<(5-seq) end --left zone + if seq<4 then zones=zones|(1<<(3-seq)) end --right zone + return zones +end +function s.banfilter(c,tp,zones) + return c:IsMonster() and c:IsControler(1-tp) and c:IsAbleToRemove() and Duel.GetMZoneCount(1-tp,c,tp,LOCATION_REASON_CONTROL,zones)>0 +end +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + local cg=c:GetColumnGroup(1,1):Sub(c:GetColumnGroup()):Match(s.banfilter,c,tp,s.get_adjacent_zones(c)) + if chkc then return cg:IsContains(chkc) end + if chk==0 then return cg:IsExists(Card.IsCanBeEffectTarget,1,nil,e) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=cg:FilterSelect(tp,Card.IsCanBeEffectTarget,1,1,nil,e) + Duel.SetTargetCard(g) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,c,1,tp,0) +end +function s.banop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local zones=s.get_adjacent_zones(c) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and c:IsRelateToEffect(e) + and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL,zones)>0 then + Duel.BreakEffect() + Duel.GetControl(c,1-tp,0,0,zones,tp) + end +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return true end + local c=e:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,c:GetOwner(),LOCATION_EXTRA) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ANGELECHY) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 + and c:IsLocation(LOCATION_EXTRA) then + local owner=c:GetOwner() + Duel.Hint(HINT_SELECTMSG,owner,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(owner,s.spfilter,owner,LOCATION_EXTRA,0,1,1,nil,e,owner) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,owner,owner,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c101305094.lua b/pre-release/c101305094.lua new file mode 100644 index 0000000000..ea5d4c14f3 --- /dev/null +++ b/pre-release/c101305094.lua @@ -0,0 +1,93 @@ +--JP name +--Angelechy Problem +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Once per turn: You can discard 1 Spell/Trap; Special Summon 1 Level 2 "Angelechy" monster from your Extra Deck, and if you do, place 1 "Angelechy" monster from your Extra Deck to your Spell & Trap Zone as a face-up Continuous Spell + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(1) + e1:SetCost(Cost.Discard(Card.IsSpellTrap)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If a face-up "Angelechy" Monster Card(s) you control is destroyed by battle or card effect: You can return 1 "Angelechy" Monster Card you own from your Spell & Trap Zone to the Extra Deck, then you can Special Summon it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_FZONE) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2:SetCondition(s.tdcon) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ANGELECHY} +function s.plfilter(c) + return c:IsSetCard(SET_ANGELECHY) and not c:IsForbidden() +end +function s.spfilter(c,e,tp) + return c:IsLevel(2) and c:IsSetCard(SET_ANGELECHY) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_EXTRA,0,1,c) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and 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 or Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==0 or Duel.GetLocationCount(tp,LOCATION_SZONE)==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() + if sc and Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then + --Treated as a Continuous Spell + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_TYPE) + e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)) + sc:RegisterEffect(e1) + end +end +function s.tdconfilter(c,tp) + return c:IsPreviousSetCard(SET_ANGELECHY) and c:IsMonsterCard() and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) + and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end +function s.tdcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.tdconfilter,1,nil,tp) +end +function s.tdfilter(c,tp) + return c:IsSetCard(SET_ANGELECHY) and c:IsMonsterCard() and c:IsOwner(tp) and c:IsFaceup() and c:IsAbleToExtra() +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_STZONE,0,1,nil,tp) end + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_STZONE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local sc=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_STZONE,0,1,1,nil,tp):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + if Duel.SendtoDeck(sc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_EXTRA) + and Duel.GetLocationCountFromEx(tp,tp,nil,sc)>0 + and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101305095.lua b/pre-release/c101305095.lua new file mode 100644 index 0000000000..5f47282473 --- /dev/null +++ b/pre-release/c101305095.lua @@ -0,0 +1,77 @@ +--JP name +--Angelechy Disturbance +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Give control of 1 "Angelechy" monster you control to your opponent (until the End Phase), then if your opponent controls a face-up card(s) in its adjacent Monster Zones and/or Spell & Trap Zones, their effects are negated + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_CONTROL+CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.ctrltg) + e1:SetOperation(s.ctrlop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --You can banish this card from your GY; add 1 "Angelechy" Spell/Trap from your Deck to your hand, except "Angelechy Disturbance" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_ANGELECHY} +function s.ctrlfilter(c) + return c:IsSetCard(SET_ANGELECHY) and c:IsControlerCanBeChanged() and c:IsFaceup() +end +function s.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.ctrlfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,tp,LOCATION_MZONE) + Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_ONFIELD) +end +function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local tc=Duel.SelectMatchingCard(tp,s.ctrlfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + if not (tc and Duel.GetControl(tc,1-tp,PHASE_END,1) and tc:IsControler(1-tp)) then return end + local c=e:GetHandler() + local break_chk=false + local function optnegate(loc,nseq) + local nc=Duel.GetFieldCard(1-tp,loc,nseq) + if nc and nc:IsNegatable() then + if not break_chk then + break_chk=true + Duel.BreakEffect() + end + nc:NegateEffects(c) + end + end + local seq=tc:GetSequence() + optnegate(LOCATION_SZONE,seq) --down + if seq>0 then optnegate(LOCATION_MZONE,seq-1) end --left + if seq<4 then optnegate(LOCATION_MZONE,seq+1) end --right + if seq==1 then optnegate(LOCATION_MZONE,5) elseif seq==3 then optnegate(LOCATION_MZONE,6) end --up +end +function s.thfilter(c) + return c:IsSetCard(SET_ANGELECHY) and c:IsSpellTrap() 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) +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/c101305096.lua b/pre-release/c101305096.lua new file mode 100644 index 0000000000..86b909dc66 --- /dev/null +++ b/pre-release/c101305096.lua @@ -0,0 +1,82 @@ +--JP name +--Angelechy Opening to e4 +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If your opponent goes first, you can also activate this card from your hand during the Standby Phase of their first turn + local e4a=Effect.CreateEffect(c) + e4a:SetType(EFFECT_TYPE_SINGLE) + e4a:SetCode(EFFECT_TRAP_ACT_IN_HAND) + e4a:SetCondition(function(e) + return Duel.GetTurnCount()==1 and Duel.IsStandbyPhase(1-e:GetHandlerPlayer()) + end) + c:RegisterEffect(e4a) + --Place 1 "Angelechy" Field Spell from your hand, Deck, or GY, face-up on your field, and if you do, Special Summon 1 Level 2 or 7 "Angelechy" monster from your Extra Deck to the Extra Monster Zone, and if you do that, place 1 "Angelechy" monster from your Extra Deck in your Spell & Trap Zone as a face-up Continuous Spell. Until the end of your next turn after this card resolves, you cannot Special Summon from the Extra Deck, except Synchro Monsters + local e4b=Effect.CreateEffect(c) + e4b:SetDescription(aux.Stringid(id,0)) + e4b:SetCategory(CATEGORY_SPECIAL_SUMMON) + e4b:SetType(EFFECT_TYPE_ACTIVATE) + e4b:SetCode(EVENT_FREE_CHAIN) + e4b:SetTarget(s.pltg) + e4b:SetOperation(s.plop) + e4b:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e4b) +end +s.listed_series={SET_ANGELECHY} +function s.plfilter(c,field) + return c:IsSetCard(SET_ANGELECHY) and not c:IsForbidden() and (not field or c:IsFieldSpell()) +end +function s.spfilter(c,e,tp) + return c:IsLevel(2,7) and c:IsSetCard(SET_ANGELECHY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.GetLocationCountFromEx(tp,tp,nil,c,ZONES_EMZ)>0 and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_EXTRA,0,1,c) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local stzone_count=Duel.GetLocationCount(tp,LOCATION_SZONE) + if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then stzone_count=stzone_count-1 end + return stzone_count>0 and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,true) + and 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.plop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.plfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,true):GetFirst() + if tc then + local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) + if fc then + Duel.SendtoGrave(fc,REASON_RULE) + Duel.BreakEffect() + end + if Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) then + 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 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,ZONES_EMZ)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() + if sc and Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then + --Treated as a Continuous Spell + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_SINGLE) + e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e4:SetCode(EFFECT_CHANGE_TYPE) + e4:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) + e4:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)) + sc:RegisterEffect(e4) + end + end + end + end + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + local reset_count=Duel.IsTurnPlayer(tp) and 2 or 1 + --Until the end of your next turn after this card resolves, you cannot Special Summon from the Extra Deck, except Synchro Monsters + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetType(EFFECT_TYPE_FIELD) + e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e4:SetTargetRange(1,0) + e4:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end) + e4:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_count) + Duel.RegisterEffect(e4,tp) +end \ No newline at end of file diff --git a/pre-release/c101402001.lua b/pre-release/c101402001.lua new file mode 100644 index 0000000000..895363e772 --- /dev/null +++ b/pre-release/c101402001.lua @@ -0,0 +1,99 @@ +--疾風の豹戦士パンサーウォリアー +--Swift Panther Warrior +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --During the Main Phase (Quick Effect): You can Tribute 1 other monster from your hand or field, then activate 1 of these effects; + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e1) + --Cannot declare an attack unless a monster(s) was Tributed this turn + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_CANNOT_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function() return not Duel.HasFlagEffect(0,id) end) + c:RegisterEffect(e2) + --Keep track of a monster 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(function(e,tp,eg,ep,ev,re,r,rp) + if not Duel.HasFlagEffect(0,id) and eg:IsExists(function(c) return c:IsPreviousLocation(LOCATION_MZONE) or (not c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsMonsterCard()) end,1,nil) then + Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) + end + end) + Duel.RegisterEffect(ge1,0) + end) +end +s.listed_names={CARD_DARK_TIME_WIZARD,id} +function s.spcostfilter(c,e,tp) + return Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) +end +function s.spfilter(c,e,tp) + return c:ListsCode(CARD_DARK_TIME_WIZARD) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.tgfilter(c) + return c:IsSpellTrap() and c:ListsCode(CARD_DARK_TIME_WIZARD) and c:IsAbleToGrave() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + --● Special Summon 1 monster that mentions "Dark Time Wizard" from your hand or Deck, except "Swift Panther Warrior" + local b1=Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,true,nil,c,e,tp) + --● Send 1 Spell/Trap that mentions "Dark Time Wizard" from your Deck to the GY + local b2=Duel.CheckReleaseGroupCost(tp,nil,1,true,nil,c) + and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then return b1 or b2 end + local filter_func=not b2 and s.spcostfilter or nil + local g=Duel.SelectReleaseGroupCost(tp,filter_func,1,1,true,nil,c,e,tp) + Duel.Release(g,REASON_COST) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + --● Special Summon 1 monster that mentions "Dark Time Wizard" from your hand or Deck, except "Swift Panther Warrior" + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) + --● Send 1 Spell/Trap that mentions "Dark Time Wizard" from your Deck to the GY + local b2=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) + 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_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) + elseif op==2 then + e:SetCategory(CATEGORY_TOGRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Special Summon 1 monster that mentions "Dark Time Wizard" from your hand or Deck, except "Swift Panther Warrior" + 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|LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + --● Send 1 Spell/Trap that mentions "Dark Time Wizard" from your Deck to the GY + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101402002.lua b/pre-release/c101402002.lua new file mode 100644 index 0000000000..3cca922154 --- /dev/null +++ b/pre-release/c101402002.lua @@ -0,0 +1,70 @@ +--ワイバーンの竜騎士 +--Alligator's Sword Dragon Knight +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Can attack directly + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_DIRECT_ATTACK) + e1:SetRange(LOCATION_MZONE) + c:RegisterEffect(e1) + --If this card is in your hand: You can reveal 1 other card in your hand that mentions "Dark Time Wizard"; Special Summon this card + 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.Reveal(function(c) return c:ListsCode(CARD_DARK_TIME_WIZARD) end,true)) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --If this card is Normal or Special Summoned: You can add up to 2 Spells/Traps with different names from each other that mention "Dark Time Wizard" from your Deck to your hand, then discard 1 card + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,1)) + e3a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_DELAY) + e3a:SetCode(EVENT_SUMMON_SUCCESS) + e3a:SetCountLimit(1,{id,1}) + e3a:SetTarget(s.thtg) + e3a:SetOperation(s.thop) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3b) +end +s.listed_names={CARD_DARK_TIME_WIZARD} +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:IsSpellTrap() and c:ListsCode(CARD_DARK_TIME_WIZARD) 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) + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,1,2,aux.dncheck,1,tp,HINTMSG_ATOHAND) + if #sg>0 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,sg) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101402003.lua b/pre-release/c101402003.lua new file mode 100644 index 0000000000..b77208d9c6 --- /dev/null +++ b/pre-release/c101402003.lua @@ -0,0 +1,72 @@ +--人造人間-サイコ・エナジー・ショッカー +--Jinzo - Energy Shocker +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --This card's name becomes "Jinzo" while in the field or GY + 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_JINZO) + c:RegisterEffect(e1) + --If this card is Normal or Special Summoned: You can destroy as many Traps your opponent controls as possible (if a card is Set, reveal it), then this card gains 300 ATK for each card destroyed this way + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,id) + e2a:SetTarget(s.destg) + e2a:SetOperation(s.desop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --Your opponent cannot activate Trap Cards or effects while you have another monster in your field or GY that mentions "Dark Time Wizard" + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e3:SetCode(EFFECT_CANNOT_ACTIVATE) + e3:SetRange(LOCATION_MZONE) + e3:SetTargetRange(0,1) + e3:SetCondition(s.cannotactcon) + e3:SetValue(function(e,re,tp) return re:IsTrapEffect() end) + c:RegisterEffect(e3) +end +s.listed_names={CARD_JINZO,CARD_DARK_TIME_WIZARD} +function s.desfilter(c) + return (c:IsTrap() and c:IsFaceup()) or (c:IsSpellTrap() and c:IsFacedown()) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsTrap),tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + local fdg=g:Filter(Card.IsFacedown,nil) + if #fdg>0 then Duel.ConfirmCards(tp,fdg) end + local traps=g:Filter(Card.IsTrap,nil) + if #traps==0 then return end + local c=e:GetHandler() + local destroy_count=Duel.Destroy(traps,REASON_EFFECT) + if destroy_count>0 and c:IsRelateToEffect(e) and c:IsFaceup() then + Duel.BreakEffect() + --This card gains 300 ATK for each card destroyed this way + c:UpdateAttack(300*destroy_count) + end + end +end +function s.cannotactconfilter(c) + return c:ListsCode(CARD_DARK_TIME_WIZARD) and c:IsMonster() and c:IsFaceup() +end +function s.cannotactcon(e) + return Duel.IsExistingMatchingCard(s.cannotactconfilter,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) +end \ No newline at end of file diff --git a/pre-release/c101402004.lua b/pre-release/c101402004.lua new file mode 100644 index 0000000000..073d82346e --- /dev/null +++ b/pre-release/c101402004.lua @@ -0,0 +1,69 @@ +--大海の伝説-フィッシャーマン +--Fisherman, Legend of the Sea +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If your opponent activates a monster effect on the field, or when their monster declares an attack, and "Umi" or a card that mentions "Dark Time Wizard" other than "Fisherman, Legend of the Sea" is on the field: 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_FIELD+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_CHAINING) + e1a:SetRange(LOCATION_HAND) + e1a:SetCountLimit(1,{id,0}) + e1a: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 end) + e1a:SetTarget(s.sptg) + e1a:SetOperation(s.spop) + 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) + --If this card is Special Summoned: You can target 1 monster your opponent controls; destroy it, also return this card from the field to the hand during the End Phase of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) + 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.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_UMI,CARD_DARK_TIME_WIZARD,id} +function s.spconfilter(c) + return (c:IsCode(CARD_UMI) or (c:ListsCode(CARD_DARK_TIME_WIZARD) and not c:IsCode(id))) and c:IsFaceup() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,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.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,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),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 + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + --Return this card from the field to the hand during the End Phase of this turn + aux.DelayedOperation(c,PHASE_END,id,e,tp,function(ag) Duel.SendtoHand(ag,nil,REASON_EFFECT) end,nil,nil,nil,aux.Stringid(id,2)) + end +end \ No newline at end of file diff --git a/pre-release/c101402009.lua b/pre-release/c101402009.lua new file mode 100644 index 0000000000..17f15084ba --- /dev/null +++ b/pre-release/c101402009.lua @@ -0,0 +1,108 @@ +--金神の戦鬼 アカスナ +--Akasuna the Golden Deity Asutra +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You can Special Summon this card (from your hand) by revealing 1 face-down card you control and returning it to the hand/Extra Deck. You can only Special Summon "Akasuna the Golden Deity Asutra" once per turn this way + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --During the Main Phase (Quick Effect): You can send 1 Trap from your hand or face-down field to the GY; change all face-up monsters your opponent controls to face-down Defense Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_POSITION+CATEGORY_SET) + 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:SetCost(s.poscost) + e2:SetTarget(s.postg) + e2:SetOperation(s.posop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) + --During your End Phase: You can Set 1 "Asutra" Trap from your Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SET) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + 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.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_series={SET_ASUTRA} +function s.spconfilter(c) + return c:IsFacedown() and (c:IsAbleToHandAsCost() or c:IsAbleToExtraAsCost()) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) + return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) + local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_CONFIRM,nil,nil,true) + if g and #g>0 then + e:SetLabelObject(g) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if g and #g>0 then + Duel.ConfirmCards(1-tp,g) + Duel.SendtoHand(g,nil,REASON_COST) + end +end +function s.poscostfilter(c) + return c:IsTrap() and (c:IsFacedown() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost() +end +function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.poscostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.poscostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) end + local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,tp,POS_FACEDOWN_DEFENSE) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil) + if #g>0 then + Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) + end +end +function s.setfilter(c) + return c:IsSetCard(SET_ASUTRA) and c:IsTrap() 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_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) +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_DECK,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101402010.lua b/pre-release/c101402010.lua new file mode 100644 index 0000000000..6079b67ef6 --- /dev/null +++ b/pre-release/c101402010.lua @@ -0,0 +1,100 @@ +--蟲神の色鬼 クズハ +--Kuzuha the Bewitching Deity Asutra +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You can Special Summon this card (from your hand) by revealing 1 face-down card you control and returning it to the hand/Extra Deck. You can only Special Summon "Kuzuha the Bewitching Deity Asutra" once per turn this way + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --You can target up to 1 card on the field for every 2 face-down 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_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) + --During your End Phase: You can target 1 "Asutra" Trap in your GY; Set it + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_SET) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_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.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_series={SET_ASUTRA} +function s.spconfilter(c) + return c:IsFacedown() and (c:IsAbleToHandAsCost() or c:IsAbleToExtraAsCost()) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) + return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) + local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_CONFIRM,nil,nil,true) + if g and #g>0 then + e:SetLabelObject(g) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if g and #g>0 then + Duel.ConfirmCards(1-tp,g) + Duel.SendtoHand(g,nil,REASON_COST) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end + local facedown_count=Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + if chk==0 then return facedown_count>=2 and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,facedown_count//2,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 +function s.setfilter(c) + return c:IsSetCard(SET_ASUTRA) and c:IsTrap() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_SET,g,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SSet(tp,tc) + end +end \ No newline at end of file diff --git a/pre-release/c101402011.lua b/pre-release/c101402011.lua new file mode 100644 index 0000000000..c4464a1fa4 --- /dev/null +++ b/pre-release/c101402011.lua @@ -0,0 +1,110 @@ +--疫神の依鬼 ヨア +--Yoa the Plague Deity Asutra +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You can Special Summon this card (from your hand) by revealing 1 face-down card you control and returning it to the hand/Extra Deck. You can only Special Summon "Yoa the Plague Deity Asutra" once per turn this way + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --During your Main Phase: You can Set 1 "Asutra" Spell/Trap from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SET) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) + --During your opponent's turn (Quick Effect): You can target 1 face-up monster on the field; increase or decrease its Level by 1 + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_LVCHANGE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(function(e,tp) + return Duel.IsTurnPlayer(1-tp) + end) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.lvtg) + e3:SetOperation(s.lvop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +s.listed_series={SET_ASUTRA} +function s.spconfilter(c) + return c:IsFacedown() and (c:IsAbleToHandAsCost() or c:IsAbleToExtraAsCost()) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) + return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) + local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_CONFIRM,nil,nil,true) + if g and #g>0 then + e:SetLabelObject(g) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if g and #g>0 then + Duel.ConfirmCards(1-tp,g) + Duel.SendtoHand(g,nil,REASON_COST) + end +end +function s.setfilter(c) + return c:IsSetCard(SET_ASUTRA) and c:IsSpellTrap() 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_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) +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_DECK,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:HasLevel() end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp,chk) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local b1=true + local b2=tc:IsLevelAbove(2) + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, --Increase its Level by 1 + {b2,aux.Stringid(id,4)}) --Decrease its Level by 1 + local value=(op==1 and op) 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(value) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/pre-release/c101402012.lua b/pre-release/c101402012.lua new file mode 100644 index 0000000000..cfd1b16fa4 --- /dev/null +++ b/pre-release/c101402012.lua @@ -0,0 +1,100 @@ +--封神の剣鬼 ミクマリ +--Mikumari the Sealing Deity Asutra +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can Special Summon this card (from your hand) by revealing 1 face-down card you control and returning it to the hand/Extra Deck. You can only Special Summon "Yoa the Plague Deity Asutra" once per turn this way + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --During your Main Phase: You can add 1 non-Wyrm "Asutra" monster from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --If this card is sent to the GY as Synchro Material for an "Asutra" monster: You can target 1 Normal Trap in your GY; Set it + 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+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_BE_MATERIAL) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.setcon) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_series={SET_ASUTRA} +function s.spconfilter(c) + return c:IsFacedown() and (c:IsAbleToHandAsCost() or c:IsAbleToExtraAsCost()) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) + return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_ONFIELD,0,nil) + local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_CONFIRM,nil,nil,true) + if g and #g>0 then + e:SetLabelObject(g) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if g and #g>0 then + Duel.ConfirmCards(1-tp,g) + Duel.SendtoHand(g,nil,REASON_COST) + end +end +function s.thfilter(c) + return not c:IsRace(RACE_WYRM) and c:IsSetCard(SET_ASUTRA) 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.setcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and c:GetReasonCard():IsSetCard(SET_ASUTRA) +end +function s.setfilter(c) + return c:IsNormalTrap() and c:IsSSetable() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_SET,g,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SSet(tp,tc) + end +end \ No newline at end of file diff --git a/pre-release/c101402013.lua b/pre-release/c101402013.lua new file mode 100644 index 0000000000..39c45ed737 --- /dev/null +++ b/pre-release/c101402013.lua @@ -0,0 +1,91 @@ +--アトランティスの竜神-ダイダロス +--Atlantis Dragon Lord - Daedalus +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --This card's name becomes "Umi" while in the Monster Zone + 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) + e1:SetValue(CARD_UMI) + c:RegisterEffect(e1) + --If you control "Atlantis, the Dragon City" or "Umi": You can 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) + --You can send up to 3 face-up "Umi" you control to the GY; add that many cards that mention "Atlantis, the Dragon City" from your Deck to your hand, except Level 7 monsters, then you can send 1 card on the field to the GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCost(s.thcost) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_UMI,CARD_ATLANTIS_THE_DRAGON_CITY} +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_ATLANTIS_THE_DRAGON_CITY,CARD_UMI),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,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.thcostfilter(c) + return c:IsCode(CARD_UMI) and c:IsFaceup() and c:IsAbleToGraveAsCost() +end +function s.thfilter(c) + return c:ListsCode(CARD_ATLANTIS_THE_DRAGON_CITY) and not c:IsLevel(7) and c:IsAbleToHand() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end + local max_count=Duel.GetMatchingGroupCount(s.thfilter,tp,LOCATION_DECK,0,nil) + max_count=math.min(max_count,3) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_ONFIELD,0,1,max_count,nil) + Duel.SendtoGrave(g,REASON_COST) + e:GetChainData().search_count=#g +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_TOGRAVE,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local search_count=e:GetChainData().search_count + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,search_count,search_count,nil) + if #g==search_count and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.ShuffleDeck(tp) + if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #sg==0 then return end + Duel.HintSelection(sg) + Duel.BreakEffect() + Duel.SendtoGrave(sg,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101402014.lua b/pre-release/c101402014.lua new file mode 100644 index 0000000000..68e664a4a0 --- /dev/null +++ b/pre-release/c101402014.lua @@ -0,0 +1,67 @@ +--アトランティスの戦将 +--General of Atlantis +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --This card's name becomes "Umi" while in the Monster Zone + 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) + e1:SetValue(CARD_UMI) + c:RegisterEffect(e1) + --You can discard this card; add 1 Spell/Trap that mentions "Atlantis, the Dragon City" from your Deck 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_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(Cost.SelfDiscard) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --If this card is in your GY and you control "Umi": You can 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}) + e3:SetCondition(s.spcon) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_UMI,CARD_ATLANTIS_THE_DRAGON_CITY} +function s.thfilter(c) + return c:IsSpellTrap() and c:ListsCode(CARD_ATLANTIS_THE_DRAGON_CITY) 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.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_UMI),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,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/c101402015.lua b/pre-release/c101402015.lua new file mode 100644 index 0000000000..8c4299955f --- /dev/null +++ b/pre-release/c101402015.lua @@ -0,0 +1,75 @@ +--アトランティスの怪腕 +--Monstrous Arms of Atlantis +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --This card's name becomes "Umi" while in the Monster Zone + 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) + e1:SetValue(CARD_UMI) + c:RegisterEffect(e1) + --If this card is Normal or Special Summoned: You can target 1 monster in your GY that mentions "Atlantis, the Dragon City"; Special Summon it in Defense Position + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,0}) + e2a:SetTarget(s.sptg) + e2a:SetOperation(s.spop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --When your opponent activates a monster effect (Quick Effect): You can banish this card from your field or GY and send 1 face-up "Umi" you control to the GY; negate that effect + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DISABLE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_CHAINING) + e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) + return ep==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) + end) + e3:SetCost(Cost.AND(Cost.SelfBanish,s.discost)) + e3:SetTarget(function(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) + end) + e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + Duel.NegateEffect(ev) + end) + c:RegisterEffect(e3) +end +s.listed_names={CARD_UMI,CARD_ATLANTIS_THE_DRAGON_CITY} +function s.spfilter(c,e,tp) + return c:ListsCode(CARD_ATLANTIS_THE_DRAGON_CITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end +end +function s.discostfilter(c) + return c:IsCode(CARD_UMI) and c:IsFaceup() and c:IsAbleToGraveAsCost() +end +function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.discostfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.discostfilter,tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end \ No newline at end of file diff --git a/pre-release/c101402016.lua b/pre-release/c101402016.lua new file mode 100644 index 0000000000..6650899826 --- /dev/null +++ b/pre-release/c101402016.lua @@ -0,0 +1,71 @@ +--アトランティスの妖渦 +--Fiendish Vortex of Atlantis +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --This card's name becomes "Umi" while in the Monster Zone + 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) + e1:SetValue(CARD_UMI) + c:RegisterEffect(e1) + --If this card is Normal or Special Summoned: You can send 1 card that mentions "Atlantis, the Dragon City" from your Deck to the GY, except "Fiendish Vortex of Atlantis" + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,0)) + e2a:SetCategory(CATEGORY_TOGRAVE) + 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.tgtg) + e2a:SetOperation(s.tgop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --If this card is sent to the GY and you control "Umi": You can Special Summon 1 WATER monster from your hand + 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 +s.listed_names={CARD_UMI,CARD_ATLANTIS_THE_DRAGON_CITY,id} +function s.tgfilter(c) + return c:ListsCode(CARD_ATLANTIS_THE_DRAGON_CITY) and not c:IsCode(id) 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) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_WATER) 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) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_UMI),tp,LOCATION_ONFIELD,0,1,nil) 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 \ No newline at end of file diff --git a/pre-release/c101402021.lua b/pre-release/c101402021.lua new file mode 100644 index 0000000000..eb0e05d52b --- /dev/null +++ b/pre-release/c101402021.lua @@ -0,0 +1,98 @@ +--D-HERO デスドグマガイ +--Destiny HERO - Death Dogma +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeSpecialSummoned() + --Must be Special Summoned (from your hand or GY) by banishing 3 Warrior and/or DARK monsters from your GY. You can only Special Summon "Destiny HERO - Death Dogma" once per turn this way + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e0:SetCondition(s.spcon) + e0:SetTarget(s.sptg) + e0:SetOperation(s.spop) + e0:SetValue(1) + c:RegisterEffect(e0) + --If Summoned this way: You can activate this effect; inflict 2000 damage to your opponent during the next Standby Phase + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_DAMAGE) + 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():IsSummonType(SUMMON_TYPE_SPECIAL+1) end) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + c:RegisterEffect(e1) + --Once per turn, when your opponent activates a card or effect (Quick Effect): You can Fusion Summon 1 DARK or Warrior Fusion Monster from your Extra Deck, by shuffling its materials from your hand, field, and/or GY into the Deck + local fusion_params={ + fusfilter=function(c) + return c:IsAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_WARRIOR) + end, + extratg=function(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_HAND|LOCATION_MZONE|LOCATION_GRAVE) + end, + extraop=Fusion.ShuffleMaterial, + extrafil=function(e,tp,mg) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE,0,nil) + end + } + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,2)) + e2:SetCategory(CATEGORY_FUSION_SUMMON+CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2) +end +s.listed_names={id} +function s.spcostfilter(c) + return (c:IsRace(RACE_WARRIOR) or c:IsAttribute(ATTRIBUTE_DARK)) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,c) + return #g>=3 and Duel.GetMZoneCount(tp,g)>0 and aux.SelectUnselectGroup(g,e,tp,3,3,aux.ChkfMMZ(1),0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,c) + local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) + if sg and #sg==3 then + e:SetLabelObject(sg) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local sg=e:GetLabelObject() + if sg and #sg==3 then + Duel.Remove(sg,POS_FACEUP,REASON_COST) + end +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,0,1,aux.Stringid(id,3),RESET_PHASE|PHASE_STANDBY) + --Inflict 2000 damage to your opponent during the next Standby Phase + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCountLimit(1) + e1:SetOperation(function() Duel.Hint(HINT_CARD,0,id) Duel.Damage(1-tp,2000,REASON_EFFECT) end) + e1:SetReset(RESET_PHASE|PHASE_STANDBY) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c101402022.lua b/pre-release/c101402022.lua new file mode 100644 index 0000000000..2cd1848c4a --- /dev/null +++ b/pre-release/c101402022.lua @@ -0,0 +1,89 @@ +--D-HERO デビルロードガイ +--Destiny HERO - Doom Liege +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card is Normal or Special Summoned: You can target 1 monster your opponent controls; banish it until the next Standby Phase + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_REMOVE) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetCountLimit(1,{id,0}) + e1a:SetTarget(s.bantg) + e1a:SetOperation(s.banop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --You can send 1 "Destiny HERO" monster from your Deck to the GY; add 1 "Clock Tower Prison" or "Clock Tower Prison City - Dark City" from your Deck or GY to your hand, also you cannot Special Summon for the rest of this turn, except DARK "HERO" monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.thcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={75041269,101402062} --"Clock Tower Prison", "Clock Tower Prison City - Dark City" +s.listed_series={SET_DESTINY_HERO,SET_HERO} +function s.bantg(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:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end + 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) +end +function s.banop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + local reset_count=1 + local return_condition=nil + if Duel.IsStandbyPhase() then + local turn_count=Duel.GetTurnCount() + reset_count=2 + return_condition=function() return Duel.GetTurnCount()~=turn_count end + end + --Banish it until the next Standby Phase + aux.RemoveUntil(tc,nil,REASON_EFFECT,PHASE_STANDBY,id,e,tp,aux.DefaultFieldReturnOp,return_condition,nil,reset_count) + end +end +function s.thcostfilter(c) + return c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster() and c:IsAbleToGraveAsCost() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_DECK,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.thfilter(c) + return c:IsCode(75041269,101402062) 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|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 sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() + if sc then + if sc:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(sc) end + Duel.SendtoHand(sc,nil,REASON_EFFECT) + if sc:IsPreviousLocation(LOCATION_DECK) then Duel.ConfirmCards(1-tp,sc) end + end + --You cannot Special Summon for the rest of this turn, except DARK "HERO" 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:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(SET_HERO)) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c101402023.lua b/pre-release/c101402023.lua new file mode 100644 index 0000000000..9bd879fafe --- /dev/null +++ b/pre-release/c101402023.lua @@ -0,0 +1,90 @@ +--D-HERO ドレッドノートサーヴァント +--Destiny HERO - Dreadnought Servant +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If you control a "Destiny HERO" monster or a face-up Field Spell: You can Special Summon this card from your hand, then you can destroy 1 card you control, and if you do, add 1 "Polymerization" from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+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) + --If you Special Summon a Level 8 "Destiny HERO" monster(s): You can banish this card from your GY, then target 1 card your opponent controls; place it on top of the Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.tdcon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DESTINY_HERO} +s.listed_names={CARD_POLYMERIZATION} +function s.spconfilter(c) + return (c:IsSetCard(SET_DESTINY_HERO) or c:IsFieldSpell()) and c:IsFaceup() +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE|LOCATION_FZONE,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) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD) + 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 + and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>0 + 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_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil) + if #g==0 then return end + Duel.HintSelection(g) + Duel.BreakEffect() + if Duel.Destroy(g,REASON_EFFECT)>0 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.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end + end + end +end +function s.tdconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsLevel(8) and c:IsSetCard(SET_DESTINY_HERO) and c:IsFaceup() +end +function s.tdcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.tdconfilter,1,nil,tp) +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToDeck() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) +end +function s.tdop(e) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) + end +end \ No newline at end of file From 28e2355d7f711d825c555f93b0faf668b38aca1f Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 25 Jun 2026 20:01:13 +0300 Subject: [PATCH 3/4] Add files via upload --- pre-release/c101402024.lua | 83 +++++++++++++++++++++ pre-release/c101402025.lua | 82 ++++++++++++++++++++ pre-release/c101402030.lua | 89 ++++++++++++++++++++++ pre-release/c101402032.lua | 70 ++++++++++++++++++ pre-release/c101402035.lua | 83 +++++++++++++++++++++ pre-release/c101402036.lua | 117 +++++++++++++++++++++++++++++ pre-release/c101402037.lua | 106 ++++++++++++++++++++++++++ pre-release/c101402039.lua | 148 +++++++++++++++++++++++++++++++++++++ pre-release/c101402040.lua | 74 +++++++++++++++++++ pre-release/c101402041.lua | 86 +++++++++++++++++++++ pre-release/c101402045.lua | 70 ++++++++++++++++++ pre-release/c101402046.lua | 115 ++++++++++++++++++++++++++++ pre-release/c101402047.lua | 99 +++++++++++++++++++++++++ pre-release/c101402049.lua | 82 ++++++++++++++++++++ pre-release/c101402050.lua | 93 +++++++++++++++++++++++ pre-release/c101402051.lua | 86 +++++++++++++++++++++ pre-release/c101402052.lua | 94 +++++++++++++++++++++++ pre-release/c101402053.lua | 121 ++++++++++++++++++++++++++++++ pre-release/c101402054.lua | 110 +++++++++++++++++++++++++++ pre-release/c101402057.lua | 100 +++++++++++++++++++++++++ pre-release/c101402058.lua | 53 +++++++++++++ pre-release/c101402059.lua | 71 ++++++++++++++++++ pre-release/c101402060.lua | 68 +++++++++++++++++ pre-release/c101402062.lua | 96 ++++++++++++++++++++++++ pre-release/c101402063.lua | 60 +++++++++++++++ pre-release/c101402068.lua | 49 ++++++++++++ pre-release/c101402070.lua | 68 +++++++++++++++++ pre-release/c101402071.lua | 98 ++++++++++++++++++++++++ pre-release/c101402073.lua | 72 ++++++++++++++++++ pre-release/c101402074.lua | 73 ++++++++++++++++++ pre-release/c101402075.lua | 64 ++++++++++++++++ pre-release/c101402076.lua | 85 +++++++++++++++++++++ pre-release/c101402136.lua | 3 + 33 files changed, 2768 insertions(+) create mode 100644 pre-release/c101402024.lua create mode 100644 pre-release/c101402025.lua create mode 100644 pre-release/c101402030.lua create mode 100644 pre-release/c101402032.lua create mode 100644 pre-release/c101402035.lua create mode 100644 pre-release/c101402036.lua create mode 100644 pre-release/c101402037.lua create mode 100644 pre-release/c101402039.lua create mode 100644 pre-release/c101402040.lua create mode 100644 pre-release/c101402041.lua create mode 100644 pre-release/c101402045.lua create mode 100644 pre-release/c101402046.lua create mode 100644 pre-release/c101402047.lua create mode 100644 pre-release/c101402049.lua create mode 100644 pre-release/c101402050.lua create mode 100644 pre-release/c101402051.lua create mode 100644 pre-release/c101402052.lua create mode 100644 pre-release/c101402053.lua create mode 100644 pre-release/c101402054.lua create mode 100644 pre-release/c101402057.lua create mode 100644 pre-release/c101402058.lua create mode 100644 pre-release/c101402059.lua create mode 100644 pre-release/c101402060.lua create mode 100644 pre-release/c101402062.lua create mode 100644 pre-release/c101402063.lua create mode 100644 pre-release/c101402068.lua create mode 100644 pre-release/c101402070.lua create mode 100644 pre-release/c101402071.lua create mode 100644 pre-release/c101402073.lua create mode 100644 pre-release/c101402074.lua create mode 100644 pre-release/c101402075.lua create mode 100644 pre-release/c101402076.lua create mode 100644 pre-release/c101402136.lua diff --git a/pre-release/c101402024.lua b/pre-release/c101402024.lua new file mode 100644 index 0000000000..37fcc633b4 --- /dev/null +++ b/pre-release/c101402024.lua @@ -0,0 +1,83 @@ +--魔救の調律者 +--Adamancipator Conductor +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card is in your hand: You can place 1 other "Adamancipator" card from your hand on top of the Deck; Special Summon this card + 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.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --During your Main Phase: You can excavate the top 5 cards of your Deck, and if you do, you can Special Summon 1 excavated Level 4 or lower Rock monster, also place the rest on the bottom of the Deck in any order + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.excavtg) + e2:SetOperation(s.excavop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ADAMANCIPATOR} +function s.spcostfilter(c) + return c:IsSetCard(SET_ADAMANCIPATOR) and c:IsAbleToDeckAsCost() +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c) + Duel.ConfirmCards(1-tp,g) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_COST) + Duel.ConfirmDecktop(tp,1) +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.excavtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.excavspfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.excavop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end + Duel.ConfirmDecktop(tp,5) + local excavg=Duel.GetDecktopGroup(tp,5) + local remaining_count=#excavg + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + local g=excavg:Match(s.excavspfilter,nil,e,tp) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.DisableShuffleCheck() + remaining_count=remaining_count-1 + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end + end + if remaining_count>0 then + if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>remaining_count then + Duel.MoveToDeckBottom(remaining_count,tp) + end + Duel.SortDeckbottom(tp,tp,remaining_count) + end +end \ No newline at end of file diff --git a/pre-release/c101402025.lua b/pre-release/c101402025.lua new file mode 100644 index 0000000000..8e2c092e6c --- /dev/null +++ b/pre-release/c101402025.lua @@ -0,0 +1,82 @@ +--魔救の奇石-ティアマイト +--Adamancipator Crystal - Tiamite +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If this card is Special Summoned by an "Adamancipator" card's effect: You can add 1 "Adamancipator" card from your Deck to your hand, except "Adamancipator Crystal - Tiamite", then you can Special Summon 1 Rock monster from 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,0}) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) + return re and re:IsCardSetcode(SET_ADAMANCIPATOR) and re:IsHasType(EFFECT_TYPE_ACTIONS) + end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If this card is in your GY: You can target 1 Rock Synchro Monster in your field or GY; return it to the Extra Deck, and if you do, place this card on top of the Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_ADAMANCIPATOR} +function s.thfilter(c) + return c:IsSetCard(SET_ADAMANCIPATOR) 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.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +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 or Duel.SendtoHand(g,nil,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_HAND) then return end + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.ShuffleDeck(tp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end + local hg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) + if #hg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local hsg=hg:Select(tp,1,1,nil) + if #hsg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(hsg,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.tdfilter(c) + return c:IsRace(RACE_ROCK) and c:IsSynchroMonster() and c:IsFaceup() and c:IsAbleToExtra() +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() + and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_EXTRA) + and c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)>0 then + Duel.ConfirmDecktop(tp,1) + end +end \ No newline at end of file diff --git a/pre-release/c101402030.lua b/pre-release/c101402030.lua new file mode 100644 index 0000000000..5c84ecd0ee --- /dev/null +++ b/pre-release/c101402030.lua @@ -0,0 +1,89 @@ +--死相の冥鑑ヒュブロ +--Hubolt the Dark Directory of Death +--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(function(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) + c:RegisterEffect(e1) + --If this card is Normal or Special Summoned: You can send 1 Level 6 or higher Zombie monster from your Deck to the GY, except "Hubolt the Dark Directory of Death", then you can add 1 Level 6 or higher Zombie monster from your GY to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND) + 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.tgtg) + e2a:SetOperation(s.tgop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --If a monster(s) is Special Summoned from the GY while this card is in the Monster Zone, you can: Immediately after this effect resolves, Xyz Summon 1 Zombie Xyz Monster + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsSummonLocation,1,nil,LOCATION_GRAVE) + end) + e3:SetTarget(s.xyztg) + e3:SetOperation(s.xyzop) + c:RegisterEffect(e3) +end +s.listed_names={id} +function s.tgfilter(c) + return c:IsLevelAbove(6) and c:IsRace(RACE_ZOMBIE) and not c:IsCode(id) 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.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) +end +function s.thfilter(c) + return c:IsLevelAbove(6) and c:IsRace(RACE_ZOMBIE) and c:IsAbleToHand() +end +function s.tgop(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,0,1,1,nil):GetFirst() + if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) then + Duel.ShuffleDeck(tp) + if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.SendtoHand(g,nil,REASON_EFFECT) + end + end + end +end +function s.xyzfilter(c) + return c:IsRace(RACE_ZOMBIE) and c:IsXyzSummonable() +end +function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.xyzop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() + if sc then + Duel.XyzSummon(tp,sc) + end +end \ No newline at end of file diff --git a/pre-release/c101402032.lua b/pre-release/c101402032.lua new file mode 100644 index 0000000000..6eb3cb9ce2 --- /dev/null +++ b/pre-release/c101402032.lua @@ -0,0 +1,70 @@ +--グリズリーファザー +--Father Grizzly +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --When this card is destroyed by battle and sent to the GY: You can Special Summon 1 Level 4 monster with 1400 ATK from your Deck, or if you have 2 or more Level 4 monsters with 1400 ATK in your GY, you can Special Summon 1 Normal Monster instead + 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:SetCode(EVENT_BATTLE_DESTROYED) + e1:SetCondition(function(e) + return e:GetHandler():IsLocation(LOCATION_GRAVE) + end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --When your opponent activates a monster effect and you control a face-up non-Effect Monster (Quick Effect): You can banish this card from your GY; negate the activation, and if you do, destroy that monster. You can only use this effect of "Father Grizzly" once per turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) + return ep==1-tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsNonEffectMonster),tp,LOCATION_MZONE,0,1,nil) + end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(function(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) + e2:SetOperation(function(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) + c:RegisterEffect(e2) +end +function s.normalspconfilter(c) + return c:IsLevel(4) and c:IsAttack(1400) +end +function s.spfilter(c,e,tp,normal_chk) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((c:IsLevel(4) and c:IsAttack(1400)) + or (normal_chk and c:IsType(TYPE_NORMAL))) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local normal_chk=Duel.IsExistingMatchingCard(s.normalspconfilter,tp,LOCATION_GRAVE,0,2,nil) + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,normal_chk) + 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 + local normal_chk=Duel.IsExistingMatchingCard(s.normalspconfilter,tp,LOCATION_GRAVE,0,2,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,normal_chk) + 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/c101402035.lua b/pre-release/c101402035.lua new file mode 100644 index 0000000000..507e219fd1 --- /dev/null +++ b/pre-release/c101402035.lua @@ -0,0 +1,83 @@ +--一日万倍龍 +--Myriaday Dragon +--Scripted by The Razgriz +local s,id=GetID() +local COUNTER_MYRIAD=0x21d +function s.initial_effect(c) + c:EnableCounterPermit(COUNTER_MYRIAD) + --Once per turn, during the End Phase: You can pay 100 LP; place 1 Myriad 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_O) + e1:SetCode(EVENT_PHASE+PHASE_END) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCost(Cost.PayLP(100)) + e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsCanAddCounter(COUNTER_MYRIAD,1) end + Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,1,tp,COUNTER_MYRIAD) + end) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + c:AddCounter(COUNTER_MYRIAD,1) + end + end) + c:RegisterEffect(e1) + --Once per turn, during your Main Phase: You can place 1 Myriad Counter on this card for every 1000 points difference between your LP and your opponent's + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_COUNTER) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local number_of_counters=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))//1000 + if chk==0 then return number_of_counters>0 and c:IsCanAddCounter(COUNTER_MYRIAD,number_of_counters) end + Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,number_of_counters,tp,COUNTER_MYRIAD) + end) + e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + local number_of_counters=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))//1000 + if number_of_counters>0 then + c:AddCounter(COUNTER_MYRIAD,number_of_counters) + end + end) + c:RegisterEffect(e2) + --Gains 10,000 ATK/DEF while it has 10 or more Myriad Counters + local e3a=Effect.CreateEffect(c) + e3a:SetType(EFFECT_TYPE_SINGLE) + e3a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3a:SetCode(EFFECT_UPDATE_ATTACK) + e3a:SetRange(LOCATION_MZONE) + e3a:SetCondition(function(e) + return e:GetHandler():GetCounter(COUNTER_MYRIAD)>=10 + end) + e3a:SetValue(10000) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e3b) + --If this card would be destroyed by battle or card effect, remove 1 Myriad Counter from it instead + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e4:SetCode(EFFECT_DESTROY_REPLACE) + e4:SetRange(LOCATION_MZONE) + e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local c=e:GetHandler() + return not c:IsReason(REASON_REPLACE|REASON_RULE) and c:HasCounter(COUNTER_MYRIAD,1) + end + return true + end) + e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + e:GetHandler():RemoveCounter(tp,COUNTER_MYRIAD,1,REASON_EFFECT) + end) + c:RegisterEffect(e4) +end +s.counter_place_list={COUNTER_MYRIAD} \ No newline at end of file diff --git a/pre-release/c101402036.lua b/pre-release/c101402036.lua new file mode 100644 index 0000000000..bcc624378b --- /dev/null +++ b/pre-release/c101402036.lua @@ -0,0 +1,117 @@ +--真紅眼の超越黒竜 +--Red-Eyes Black Dragon Exceed +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: "Red-Eyes Black Dragon" + 1 monster that mentions "Dark Time Wizard" + Fusion.AddProcMix(c,true,true,CARD_REDEYES_B_DRAGON,aux.FilterBoolFunction(Card.ListsCode,CARD_DARK_TIME_WIZARD)) + c:AddMustBeFusionSummoned() + --Must be either Fusion Summoned, or Special Summoned (from your Extra Deck) by Tributing 1 face-up monster on either field during the turn a monster(s) was destroyed by the effect of "Dark Time Wizard" + local e0a=Effect.CreateEffect(c) + e0a:SetDescription(aux.Stringid(id,0)) + e0a:SetType(EFFECT_TYPE_FIELD) + e0a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0a:SetCode(EFFECT_SPSUMMON_PROC) + e0a:SetRange(LOCATION_EXTRA) + e0a:SetCondition(s.selfspcon) + e0a:SetTarget(s.selfsptg) + e0a:SetOperation(s.selfspop) + e0a:SetValue(1) + c:RegisterEffect(e0a) + --You can only Special Summon "Red-Eyes Black Dragon Exceed" once per turn this way, no matter which method you use + local e0b=Effect.CreateEffect(c) + e0b:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0b:SetCode(EVENT_SPSUMMON_SUCCESS) + e0b:SetCondition(s.regcon) + e0b:SetOperation(s.regop) + c:RegisterEffect(e0b) + --Keep track of a monster being destroyed by the effect of "Dark Time Wizard" + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_DESTROYED) + ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + if r&REASON_EFFECT>0 and re:GetHandler():IsCode(CARD_DARK_TIME_WIZARD) then + Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) + end + end) + Duel.RegisterEffect(ge1,0) + end) + --If this card is Special Summoned: You can Special Summon 1 Level 8 or lower monster from your hand or GY + 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:SetTarget(s.lv8sptg) + e1:SetOperation(s.lv8spop) + c:RegisterEffect(e1) + --Unaffected by your opponent's activated monster and Spell effects + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_IMMUNE_EFFECT) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(function(e,te) return te:GetOwnerPlayer()==1-e:GetHandlerPlayer() and te:IsActivated() and (te:IsMonsterEffect() or te:IsSpellEffect()) end) + c:RegisterEffect(e2) +end +s.listed_names={CARD_REDEYES_B_DRAGON,CARD_DARK_TIME_WIZARD,id} +s.material={CARD_REDEYES_B_DRAGON} +s.material_setcode={SET_RED_EYES} +function s.selfspcostfilter(c,tp,fc) + return c:IsReleasable() and c:IsFaceup() and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION,tp) + and Duel.GetLocationCountFromEx(tp,tp,c,fc)>0 +end +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.HasFlagEffect(0,id) and Duel.CheckReleaseGroup(tp,s.selfspcostfilter,1,false,1,true,c,tp,nil,true,nil,tp,c) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspcostfilter,1,1,false,true,true,c,tp,nil,true,nil,tp,c) + if g and #g>0 then + e:SetLabelObject(g) + return true + end + return false +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if g and #g>0 then + Duel.Release(g,REASON_COST|REASON_MATERIAL) + end +end +function s.regcon(e) + local c=e:GetHandler() + return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + --You can only Special Summon "Red-Eyes Black Dragon Exceed" once per turn this way, no matter which method you use + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCodeRule(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.lv8spfilter(c,e,tp) + return c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.lv8sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.lv8spfilter,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.lv8spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.lv8spfilter),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/c101402037.lua b/pre-release/c101402037.lua new file mode 100644 index 0000000000..71e665b759 --- /dev/null +++ b/pre-release/c101402037.lua @@ -0,0 +1,106 @@ +--D-HERO ドレッドノートガイ +--Destiny HERO - Dreadnought +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2 Level 5 or higher "Destiny HERO" monsters + Fusion.AddProcMixN(c,true,true,s.matfilter,2) + --Must be either Fusion Summoned, or Special Summoned (from your Extra Deck) by Tributing 1 "Destiny HERO - Dreadmaster" + c:AddMustBeFusionSummoned() + local e0a=Effect.CreateEffect(c) + e0a:SetDescription(aux.Stringid(id,0)) + e0a:SetType(EFFECT_TYPE_FIELD) + e0a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0a:SetCode(EFFECT_SPSUMMON_PROC) + e0a:SetRange(LOCATION_EXTRA) + e0a:SetCondition(s.selfspcon) + e0a:SetTarget(s.selfsptg) + e0a:SetOperation(s.selfspop) + e0a:SetValue(1) + c:RegisterEffect(e0a) + --You can only Special Summon "Destiny HERO - Dreadnought" once per turn this way, no matter which method you use + local e0b=Effect.CreateEffect(c) + e0b:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0b:SetCode(EVENT_SPSUMMON_SUCCESS) + e0b:SetCondition(s.regcon) + e0b:SetOperation(s.regop) + c:RegisterEffect(e0b) + --If this card is Special Summoned: You can add 2 "Destiny HERO" monsters and/or cards that mention a "Destiny HERO" monster's card name from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + 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:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --This card's ATK becomes the total original ATK of all other "Destiny HERO" monsters in your field and GY + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_SET_ATTACK) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(function(e,c) return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_DESTINY_HERO),c:GetControler(),LOCATION_MZONE|LOCATION_GRAVE,0,c):GetSum(Card.GetBaseAttack) end) + c:RegisterEffect(e2) +end +s.listed_names={40591390} --"Destiny HERO - Dreadmaster" +s.listed_series={SET_DESTINY_HERO} +s.material_setcode={SET_DESTINY_HERO,SET_HERO} +function s.matfilter(c,fc,sumtype,sump) + return c:IsLevelAbove(5) and c:IsSetCard(SET_DESTINY_HERO,fc,sumtype,sump) +end +function s.selfspcostfilter(c,tp,fc) + return c:IsSummonCode(fc,MATERIAL_FUSION,tp,40591390) and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION,tp) and Duel.GetLocationCountFromEx(tp,tp,c,fc)>0 +end +function s.selfspcon(e,c) + if not c then return true end + local tp=c:GetControler() + return Duel.CheckReleaseGroup(tp,s.selfspcostfilter,1,false,1,true,c,tp,nil,nil,nil,tp,c) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectReleaseGroup(tp,s.selfspcostfilter,1,1,false,true,true,c,tp,nil,false,nil,tp,c) + if g and #g>0 then + e:SetLabelObject(g) + return true + end + return false +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if g and #g>0 then + Duel.Release(g,REASON_COST|REASON_MATERIAL) + end +end +function s.regcon(e) + local c=e:GetHandler() + return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + --You can only Special Summon "Destiny HERO - Dreadnought" once per turn this way, no matter which method you use + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCodeRule(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thfilter(c) + return ((c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster()) or c:ListsCodeWithArchetype(SET_DESTINY_HERO)) 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,2,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,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,2,2,nil) + if #g==2 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/c101402039.lua b/pre-release/c101402039.lua new file mode 100644 index 0000000000..a4d7fc727f --- /dev/null +++ b/pre-release/c101402039.lua @@ -0,0 +1,148 @@ +--鬼神 朱沙之王 +--Asutraja Susanoo +--scripted by Naim +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 Synchro Summoned: You can banish any number of Traps from your GY; banish that many cards on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + 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:SetCost(s.bancost) + e1:SetTarget(s.bantg) + e1:SetOperation(s.banop) + c:RegisterEffect(e1) + --During the End Phase: You can target up to 2 "Asutra" monsters and/or "Asutra" Traps in your GY and/or banishment; for each of them, add it to your hand or Set it, then if you targeted 2 cards, return this card to the Extra Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SET+CATEGORY_LEAVE_GRAVE+CATEGORY_TOEXTRA) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.thsettg) + e2:SetOperation(s.thsetop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ASUTRA} +function s.bancost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsTrap,Card.IsAbleToRemoveAsCost),tp,LOCATION_GRAVE,0,1,nil) end + local max_banish_count=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsTrap,Card.IsAbleToRemoveAsCost),tp,LOCATION_GRAVE,0,1,max_banish_count,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) + e:GetChainData().banish_count=#g +end +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,e:GetChainData().banish_count,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.banop(e,tp,eg,ep,ev,re,r,rp) + local banish_count=e:GetChainData().banish_count + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + if #g0 + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.setfilter(chkc,e,tp,mmz_chk) end + if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp,mmz_chk) end + local c=e:GetHandler() + local to_extra_chk=c:IsAbleToExtra() + local free_mzones=Duel.GetLocationCount(tp,LOCATION_MZONE) + local free_stzones=Duel.GetLocationCount(tp,LOCATION_SZONE) + local g=Duel.GetTargetGroup(s.setfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp,mmz_chk) + local tg=aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon(to_extra_chk,free_mzones,free_stzones),1,tp,aux.Stringid(id,2)) + Duel.SetTargetCard(tg) + Duel.SetPossibleOperationInfo(0,CATEGORY_SET,tg,#tg,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,tg,#tg,tp,0) + if tg:IsExists(Card.IsMonster,1,nil) then + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg:Filter(Card.IsMonster,nil),1,tp,0) + end + if tg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tg:Filter(Card.IsLocation,nil,LOCATION_GRAVE),1,tp,0) + end + if #tg==2 then + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) + end + e:GetChainData().number_of_targets=#tg +end +function s.thsetop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==0 then return end + local success=false + for i=1,#tg do + local tc=nil + if #tg==2 then + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) + tc=tg:Select(tp,1,1,nil):GetFirst() + Duel.HintSelection(tc) + tg:RemoveCard(tc) + else + tc=tg:GetFirst() + if i==2 then + Duel.HintSelection(tc) + end + end + local monster_set_chk=tc:IsMonster() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + local trap_set_chk=tc:IsTrap() and tc:IsSSetable() + local success_chk=aux.ToHandOrElse(tc,tp, + function() + return monster_set_chk or trap_set_chk + end, + function() + if monster_set_chk then + if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) then + Duel.ConfirmCards(1-tp,tc) + return true + end + elseif trap_set_chk then + return Duel.SSet(tp,tc)>0 + end + end, + aux.Stringid(id,3) + ) + if tc:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(tp) end + if not success and success_chk then success=true end + end + Duel.SpecialSummonComplete() + local c=e:GetHandler() + if success and c:IsRelateToEffect(e) and e:GetChainData().number_of_targets==2 then + Duel.BreakEffect() + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101402040.lua b/pre-release/c101402040.lua new file mode 100644 index 0000000000..092db5cb99 --- /dev/null +++ b/pre-release/c101402040.lua @@ -0,0 +1,74 @@ +--鬼神 水子守命 +--Asutraya Mikumari no Mikoto +--scripted by Naim +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 "Asutra" card from your Deck to the GY, and if you do, send 1 card on the field to the GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) + --If your opponent activates a monster effect: You can target 1 "Asutra" Trap in your GY or banishment, or if there are 3 or more face-down cards on the field, you can target 1 Trap in your GY instead; Set it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SET) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsMonsterEffect() + end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ASUTRA} +function s.tgfilter(c) + return c:IsSetCard(SET_ASUTRA) and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK|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,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #tg>0 then + Duel.HintSelection(tg) + Duel.SendtoGrave(tg,REASON_EFFECT) + end + end +end +function s.setfilter(c,allow_any_trap) + return c:IsTrap() and c:IsFaceup() and c:IsSSetable() + and (c:IsSetCard(SET_ASUTRA) or (allow_any_trap and c:IsLocation(LOCATION_GRAVE))) +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local allow_any_trap=Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)>=3 + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.setfilter(chkc,allow_any_trap) end + if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,allow_any_trap) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,allow_any_trap) + Duel.SetOperationInfo(0,CATEGORY_SET,g,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SSet(tp,tc) + end +end \ No newline at end of file diff --git a/pre-release/c101402041.lua b/pre-release/c101402041.lua new file mode 100644 index 0000000000..c4f3be24d7 --- /dev/null +++ b/pre-release/c101402041.lua @@ -0,0 +1,86 @@ +--魔救の奇跡-ティアマイト +--Adamancipator Risen - Tiamite +--Scripted by Hatter +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 you have a DARK monster in your GY: You can add 1 "Adamancipator" 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_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e,tp) + return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) + end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --When your opponent activates a monster effect on the field (Quick Effect): You can excavate the top 5 cards of your Deck, and if you do, you can return cards your opponent controls to the hand, up to the number of excavated Rock monsters, also place the excavated cards on the bottom of the Deck in any order + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + 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 and Chain.IsTriggeringLocation(ev,LOCATION_MZONE) + end) + e2:SetTarget(s.excavtg) + e2:SetOperation(s.excavop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ADAMANCIPATOR} +function s.thfilter(c,e,tp) + return c:IsSetCard(SET_ADAMANCIPATOR) 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.excavtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_ONFIELD) +end +function s.excavop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end + Duel.ConfirmDecktop(tp,5) + local excavg=Duel.GetDecktopGroup(tp,5) + local excav_count=#excavg + local excav_rock_count=excavg:FilterCount(Card.IsRace,nil,RACE_ROCK) + local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil) + if excav_rock_count>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + local return_count=math.min(#g,excav_rock_count) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local sg=g:Select(tp,1,return_count,nil) + if #sg>0 then + Duel.HintSelection(sg) + Duel.SendtoHand(sg,nil,REASON_EFFECT) + local og=Duel.GetOperatedGroup():Match(Card.IsLocation,nil,LOCATION_HAND) + if #og>0 then + if og:IsExists(Card.IsControler,1,nil,tp) then + Duel.ShuffleHand(tp) + end + if og:IsExists(Card.IsControler,1,nil,1-tp) then + Duel.ShuffleHand(1-tp) + end + end + end + end + if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>excav_count then + Duel.MoveToDeckBottom(excav_count,tp) + end + Duel.SortDeckbottom(tp,tp,excav_count) +end \ No newline at end of file diff --git a/pre-release/c101402045.lua b/pre-release/c101402045.lua new file mode 100644 index 0000000000..86c7ae1ae9 --- /dev/null +++ b/pre-release/c101402045.lua @@ -0,0 +1,70 @@ +--燦冠乗騎シックラヴィー +--Swickelavee the Brilliantly Crowned Heavy Cavalry +--scripted by Naim +local s,id=GetID() +local COUNTER_CROWN=0x21c +function s.initial_effect(c) + c:EnableReviveLimit() + c:EnableCounterPermit(COUNTER_CROWN) + --Xyz Summon procedure: 2 Level 3 monsters, OR, once per turn, you can also Xyz Summon "Swickelavee the Brilliantly Crowned Heavy Cavalry" by using 1 Beast monster you control with 2000 or less ATK + Xyz.AddProcedure(c,nil,3,2,s.altxyzmat,aux.Stringid(id,0),2,s.altxyzop) + --Cannot be used as material for an Xyz Summon + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) + e0:SetValue(1) + c:RegisterEffect(e0) + --If this card destroys a monster by battle: Place 1 Crown Counter on it, then apply this effect based on the number of Crown Counters on it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_COUNTER+CATEGORY_ATKCHANGE+CATEGORY_TOEXTRA+CATEGORY_DRAW) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_BATTLE_DESTROYING) + e1:SetCondition(function(e) + return e:GetHandler():IsRelateToBattle() + end) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +s.listed_names={id} +s.counter_place_list={COUNTER_CROWN} +function s.altxyzmat(c,tp,xyz) + return c:IsRace(RACE_BEAST,xyz,SUMMON_TYPE_XYZ,tp) and c:IsAttackBelow(2000) and c:IsFaceup() +end +function s.altxyzop(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.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local c=e:GetHandler() + local crown_counters=c:GetCounter(COUNTER_CROWN) + Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,1,tp,COUNTER_CROWN) + if crown_counters<3 then + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,crown_counters==1 and 400 or 600) + end + if crown_counters==2 then + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,3) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:AddCounter(COUNTER_CROWN,1) then + local crown_counters=c:GetCounter(COUNTER_CROWN) + if crown_counters==1 then + --● 1: This card gains 400 ATK + c:UpdateAttack(400) + elseif crown_counters==2 then + --● 2: This card gains 600 ATK + c:UpdateAttack(600) + elseif crown_counters==3 then + --● 3: Return this card to the Extra Deck, and if you do, draw 3 cards + if Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and c:IsLocation(LOCATION_EXTRA) then + Duel.Draw(tp,3,REASON_EFFECT) + end + end + end +end \ No newline at end of file diff --git a/pre-release/c101402046.lua b/pre-release/c101402046.lua new file mode 100644 index 0000000000..aa9d77934d --- /dev/null +++ b/pre-release/c101402046.lua @@ -0,0 +1,115 @@ +--蒼海竜神-ネオダイダロス・レイジ +--Blue Ocean Dragon Lord - Neo Daedalus Rage +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 4 monsters + Link.AddProcedure(c,nil,4,4) + --Additional prcedure for "Atlantis, the Dragon City" + Link.AddProcedure(c,nil,3,3,nil,aux.Stringid(CARD_ATLANTIS_THE_DRAGON_CITY,0),s.splimit) + --If this card is Link Summoned: You can Special Summon up to 3 monsters that mention "Atlantis, the Dragon City" from your GY to your zones this card points to, also you cannot Special Summon for the rest of this turn + 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:SetCondition(function(e) + return e:GetHandler():IsLinkSummoned() + end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --This card's name becomes "Umi" while in the Monster Zone + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_CHANGE_CODE) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(CARD_UMI) + c:RegisterEffect(e2) + --Once per turn (Quick Effect): You can send 1 face-up "Umi" you control to the GY; send all cards on the field to the GY, except "Umi" + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOGRAVE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetCost(s.tgcost) + e3:SetTarget(s.tgtg) + e3:SetOperation(s.tgop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +s.listed_names={CARD_ATLANTIS_THE_DRAGON_CITY,CARD_UMI} +function s.splimit(e,se,sp,st) + if Duel.IsPlayerAffectedByEffect(sp,CARD_ATLANTIS_THE_DRAGON_CITY) then + local c=e:GetHandler() + c:AssumeProperty(ASSUME_LINK,c:GetLink()-1) + return true + end + return false +end +function s.spfilter(c,e,tp,zone) + return c:ListsCode(CARD_ATLANTIS_THE_DRAGON_CITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local zone=e:GetHandler():GetFreeLinkedZone() + if chk==0 then return zone>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) 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 c=e:GetHandler() + local zone=c:GetFreeLinkedZone() + if c:IsRelateToEffect(e) and zone>0 then + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp,zone) + local znct=0 + --This is basically a popcount algorithm used here to count how many zones are among the 'zone' variable + for i=0,4 do + if zone&(1<0 then + znct=znct+1 + end + end + local ct=math.min(3,#g,znct) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and ct>1 then ct=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,1,ct,nil) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP,zone) + end + end + --You cannot Special Summon for the rest of this turn + 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:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.tgcostfilter(c) + return c:IsCode(CARD_UMI) and c:IsFaceup() and c:IsAbleToGraveAsCost() +end +function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.tgfilter(c) + return not (c:IsCode(CARD_UMI) and c:IsFaceup()) and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,tp,0) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101402047.lua b/pre-release/c101402047.lua new file mode 100644 index 0000000000..a3f1ddef4f --- /dev/null +++ b/pre-release/c101402047.lua @@ -0,0 +1,99 @@ +--真海竜騎-ダイダロス +--Levia-Dragoon - Daedalus +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 3 WATER monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WATER),3,3) + --Additional prcedure for "Atlantis, the Dragon City" + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WATER),2,2,nil,aux.Stringid(CARD_ATLANTIS_THE_DRAGON_CITY,0),s.splimit) + --This card's name becomes "Umi" while in the Monster Zone + 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) + e1:SetValue(CARD_UMI) + c:RegisterEffect(e1) + --If this card is Link Summoned: You can Special Summon 1 monster that mentions "Atlantis, the Dragon City" from your Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + 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():IsLinkSummoned() + end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --During the Main Phase (Quick Effect): You can send 1 face-up "Umi" you control to the GY; discard your opponent's entire hand, and if you do, they draw the same number of cards. Neither player can activate cards or effects in response to this effect's activation + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function() + return Duel.IsMainPhase() + end) + e3:SetCost(s.discardcost) + e3:SetTarget(s.discardtg) + e3:SetOperation(s.discardop) + e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e3) +end +s.listed_names={CARD_UMI,CARD_ATLANTIS_THE_DRAGON_CITY} +function s.splimit(e,se,sp,st) + if Duel.IsPlayerAffectedByEffect(sp,CARD_ATLANTIS_THE_DRAGON_CITY) then + local c=e:GetHandler() + c:AssumeProperty(ASSUME_LINK,c:GetLink()-1) + return true + end + return false +end +function s.spfilter(c,e,tp) + return c:ListsCode(CARD_ATLANTIS_THE_DRAGON_CITY) 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,chk) + 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.discardcostfilter(c) + return c:IsCode(CARD_UMI) and c:IsFaceup() and c:IsAbleToGraveAsCost() +end +function s.discardcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.discardcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.discardcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.discardtg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) + local ct=#g + if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(1-tp,ct) end + Duel.SetOperationInfo(0,CATEGORY_HANDES,g,ct,1-tp,ct) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,ct) + Duel.SetChainLimit(aux.FALSE) +end +function s.discardop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) + if #g>0 then + local ct=Duel.SendtoGrave(g,REASON_DISCARD|REASON_EFFECT) + if ct==0 then return end + Duel.Draw(1-tp,ct,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101402049.lua b/pre-release/c101402049.lua new file mode 100644 index 0000000000..eea8eec6eb --- /dev/null +++ b/pre-release/c101402049.lua @@ -0,0 +1,82 @@ +--魔救の輝跡 +--Adamancipator Luminous +--scripted by Naim +local s,id=GetID() +local TOKEN_GLIMMER=id+100 +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 Effect Monsters, including a Synchro Monster + Link.AddProcedure(c,nil,2,2,s.linkmatcheck) + --If this card is Link Summoned, or a monster(s) is Special Summoned to a zone(s) this card points to: You can target 1 monster in your field or GY that has a Level; Special Summon 1 "Glimmer Token" (Rock/LIGHT/ATK 0/DEF 0) with the same Level + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1a:SetCode(EVENT_SPSUMMON_SUCCESS) + e1a:SetCountLimit(1,{id,0}) + e1a:SetCondition(function(e) + return e:GetHandler():IsLinkSummoned() + end) + e1a:SetTarget(s.tkntg) + e1a:SetOperation(s.tknop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1b:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1b:SetRange(LOCATION_MZONE) + e1b:SetCondition(aux.zptcon(nil)) + c:RegisterEffect(e1b) + --When another monster on the field activates its effect (Quick Effect): You can place it on top of the Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.tdcon) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ADAMANCIPATOR} +function s.linkmatcheck(g,lc,sumtype,tp) + return g:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO,lc,sumtype,tp) +end +function s.tgfilter(c,e,tp) + return c:IsFaceup() and c:HasLevel() + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_GLIMMER,0,TYPES_TOKEN,0,0,c:GetLevel(),RACE_ROCK,ATTRIBUTE_LIGHT) +end +function s.tkntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.tgfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) +end +function s.tknop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_GLIMMER,0,TYPES_TOKEN,0,0,tc:GetLevel(),RACE_ROCK,ATTRIBUTE_LIGHT) then + local token=Duel.CreateToken(tp,TOKEN_GLIMMER) + token:Level(tc:GetLevel()) + Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.tdcon(e,tp,eg,ep,ev,re,r,rp) + return re:IsMonsterEffect() and re:GetHandler()~=e:GetHandler() and Chain.IsTriggeringLocation(ev,LOCATION_MZONE) +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) + local rc=re:GetHandler() + if chk==0 then return rc:IsRelateToEffect(re) and rc:IsAbleToDeck() end + Duel.SetOperationInfo(0,CATEGORY_TODECK,rc,1,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) then + Duel.SendtoDeck(rc,nil,SEQ_DECKTOP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101402050.lua b/pre-release/c101402050.lua new file mode 100644 index 0000000000..04c0aa06c1 --- /dev/null +++ b/pre-release/c101402050.lua @@ -0,0 +1,93 @@ +--海中戦型お手伝いロボ +--Helping Robo for Underwater Combat +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 Machine monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),2) + --If this card is Link Summoned: You can target 1 monster your opponent controls; destroy it, also this card, then you can Special Summon 1 non-WATER Machine monster with 1600 or less ATK from your GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + 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 e:GetHandler():IsLinkSummoned() + end) + e1:SetCost(s.effcost) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --If this card is banished: You can add 1 Machine monster whose ATK equals its own DEF 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_REMOVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.effcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsRace(RACE_MACHINE) end) +end +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 Machine 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_MACHINE) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g+e:GetHandler(),2,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.spfilter(c,e,tp) + return c:IsAttributeExcept(ATTRIBUTE_WATER) and c:IsRace(RACE_MACHINE) and c:IsAttackBelow(1600) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + local dg=Group.FromCards(c,tc):Match(Card.IsRelateToEffect,nil,e) + if #dg>0 and Duel.Destroy(dg,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),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 +function s.thfilter(c) + return c:IsRace(RACE_MACHINE) and c:IsDefense(c:GetAttack()) and c:IsAttackAbove(0) and c:IsDefenseAbove(0) + 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/c101402051.lua b/pre-release/c101402051.lua new file mode 100644 index 0000000000..15ee9b0278 --- /dev/null +++ b/pre-release/c101402051.lua @@ -0,0 +1,86 @@ +--解層竜ストラティアエ +--Destratification Dino Stratiae +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 monsters, including a Dinosaur monster + Link.AddProcedure(c,nil,2,2,s.linkmatcheck) + --Keep track of the total original ATK of the Dinosaur monsters used as its material + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(function(e,c) + local mg=c:GetMaterial():Match(Card.IsRace,nil,RACE_DINOSAUR,c,SUMMON_TYPE_LINK,e:GetHandlerPlayer()) + e:SetLabel(mg:GetSum(Card.GetBaseAttack)//2) + end) + c:RegisterEffect(e0) + --If this card is Link Summoned: You can make this card gain ATK equal to half the total original ATK of the Dinosaur monsters used as its material + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + 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():IsLinkSummoned() and e0:GetLabel()>0 + end) + e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local atk=e0:GetLabel() + e:GetChainData().atk=atk + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,atk) + end) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + --Make this card gain ATK equal to half the total original ATK of the Dinosaur monsters used as its material + c:UpdateAttack(e:GetChainData().atk) + end + end) + c:RegisterEffect(e1) + --During your Main Phase: You can Fusion Summon 1 Dinosaur Fusion Monster from your Extra Deck, by banishing its materials from your field and/or GY, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Dinosaur monsters. You can only use this effect of "Destratification Dino Stratiae" once per turn + local fusion_params={ + fusfilter=function(c) return c:IsRace(RACE_DINOSAUR) end, + matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove), + extrafil=function(e,tp,mg) + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) + end + return nil + end, + extraop=Fusion.BanishMaterial, + extratg=function(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE|LOCATION_GRAVE) + end, + stage2=function(e,fc,tp,mg,chk) + if chk~=2 then return end + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Dinosaur 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:IsRaceExcept(RACE_DINOSAUR) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(c) return not c:IsOriginalRace(RACE_DINOSAUR) end) + end + } + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2) +end +function s.linkmatcheck(g,linkc,sumtype,tp) + return g:IsExists(Card.IsRace,1,nil,RACE_DINOSAUR,linkc,sumtype,tp) +end \ No newline at end of file diff --git a/pre-release/c101402052.lua b/pre-release/c101402052.lua new file mode 100644 index 0000000000..934a7d36e0 --- /dev/null +++ b/pre-release/c101402052.lua @@ -0,0 +1,94 @@ +--時の黒魔術師 +--Dark Time Wizard +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects (but you can only use each effect of "Dark Time Wizard" 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:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(TIMING_END_PHASE,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_names={id} +s.toss_coin=true +function s.deckthfilter(c) + return c:ListsCode(id) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + --● Add 1 card that mentions "Dark Time Wizard" from your Deck to your hand, except "Dark Time Wizard", also add 1 "Dark Time Wizard" from your GY to your hand during the End Phase of this turn + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) + --● Toss a coin and call it. If you call it right, destroy as many monsters your opponent controls as possible, and if you do, inflict damage to your opponent equal to half the total original ATK of those monsters. If you call it wrong, destroy all monsters you control + local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) + local b2=not Duel.HasFlagEffect(tp,id+100) and #g>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 + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) + else + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_COIN+CATEGORY_DESTROY+CATEGORY_DAMAGE) + Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,1,1-tp,0) + end +end +function s.gythfilter(c) + return c:IsCode(id) and c:IsAbleToHand() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Add 1 card that mentions "Dark Time Wizard" from your Deck to your hand, except "Dark Time Wizard", also add 1 "Dark Time Wizard" from your GY to your hand during the End Phase of this turn + 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 + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) + --Add 1 "Dark Time Wizard" from your GY to your hand during the End Phase of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_PHASE+PHASE_END) + e1:SetCountLimit(1) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_CARD,0,id) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.gythfilter),tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end + end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + elseif op==2 then + --● Toss a coin and call it. If you call it right, destroy as many monsters your opponent controls as possible, and if you do, inflict damage to your opponent equal to half the total original ATK of those monsters. If you call it wrong, destroy all monsters you control + if Duel.CallCoin(tp) then + local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then + local dam=Duel.GetOperatedGroup():GetSum(Card.GetBaseAttack) + if dam>0 then + Duel.Damage(1-tp,dam/2,REASON_EFFECT) + end + end + else + local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end + end + end +end \ No newline at end of file diff --git a/pre-release/c101402053.lua b/pre-release/c101402053.lua new file mode 100644 index 0000000000..32bbebcccc --- /dev/null +++ b/pre-release/c101402053.lua @@ -0,0 +1,121 @@ +--天使と悪魔のサイコロ +--Graceful Skull Dice +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Roll a six-sided die twice and apply these effects for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DICE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(TIMING_DAMAGE_STEP) + c:RegisterEffect(e1) + local g=Group.CreateGroup() + --If your opponent Normal or Special Summons a monster(s) while this card is in your GY: You can banish this card, then target 1 of those monsters; roll a six-sided die twice, and if the total is 6 or more, destroy that monster + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_DICE+CATEGORY_DESTROY) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2a:SetCode(EVENT_CUSTOM+id) + e2a:SetRange(LOCATION_GRAVE) + e2a:SetCost(Cost.SelfBanish) + e2a:SetTarget(s.destg) + e2a:SetOperation(s.desop) + e2a:SetLabelObject(g) + c:RegisterEffect(e2a) + --Keep track of monsters the opponent Normal or Special Summons + local e2b=Effect.CreateEffect(c) + e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2b:SetCode(EVENT_SUMMON_SUCCESS) + e2b:SetRange(LOCATION_GRAVE) + e2b:SetLabelObject(e2a) + e2b:SetOperation(s.regop) + c:RegisterEffect(e2b) + local e2c=e2b:Clone() + e2c:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2c) +end +s.listed_names={CARD_DARK_TIME_WIZARD} +s.roll_dice=true +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,2) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local d1,d2=Duel.TossDice(tp,2) + local total_atkdef=(d1+d2)*200 + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) + --● Monsters you control that mention "Dark Time Wizard" gain ATK/DEF equal to the total x 200 + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD) + e1a:SetCode(EFFECT_UPDATE_ATTACK) + e1a:SetTargetRange(LOCATION_MZONE,0) + e1a:SetTarget(function(e,c) return c:ListsCode(CARD_DARK_TIME_WIZARD) end) + e1a:SetValue(total_atkdef) + e1a:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1a,tp) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_UPDATE_DEFENSE) + Duel.RegisterEffect(e1b,tp) + aux.RegisterClientHint(c,nil,tp,0,1,aux.Stringid(id,3)) + --● Monsters your opponent controls lose ATK/DEF equal to the total x 200 + local e2a=e1a:Clone() + e2a:SetTargetRange(0,LOCATION_MZONE) + e2a:SetTarget(aux.TRUE) + e2a:SetValue(-total_atkdef) + Duel.RegisterEffect(e2a,tp) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_UPDATE_DEFENSE) + Duel.RegisterEffect(e2b,tp) +end +function s.desfilter(c,e,opp) + return c:IsSummonPlayer(opp) and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_MZONE) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsDamageStep() then return end + local tg=eg:Filter(s.desfilter,nil,e,1-tp) + if #tg>0 then + for tc in tg:Iter() do + tc:RegisterFlagEffect(id,RESET_CHAIN,0,1) + end + local g=e:GetLabelObject():GetLabelObject() + if Duel.GetCurrentChain()==0 then g:Clear() end + g:Merge(tg) + g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil) + e:GetLabelObject():SetLabelObject(g) + Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local opp=1-tp + local g=e:GetLabelObject():Filter(s.desfilter,nil,e,opp) + if chkc then return g:IsContains(chkc) and s.desfilter(chkc,e,opp) end + if chk==0 then return #g>0 end + local tc=nil + if #g>1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + tc=g:Select(tp,1,1,nil):GetFirst() + else + tc=g:GetFirst() + end + Duel.SetTargetCard(tc) + Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,2) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + local d1,d2=Duel.TossDice(tp,2) + if d1+d2>=6 then + Duel.Destroy(tc,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101402054.lua b/pre-release/c101402054.lua new file mode 100644 index 0000000000..762e4d4c9d --- /dev/null +++ b/pre-release/c101402054.lua @@ -0,0 +1,110 @@ +--眠れる羊 スケープ・ゴート +--Sleeping Scapegoats +--scripted by pyrQ +local s,id=GetID() +local TOKEN_SCAPEGOAT=id+100 +function s.initial_effect(c) + --Special Summon up to 4 "Scapegoat Tokens" (Beast/EARTH/Level 1/ATK 0/DEF 0) in Defense Position, then if your opponent controls a monster, you can Special Summon 1 "Swift Panther Warrior" from your Deck, also for the rest of this turn, these Tokens cannot be Tributed for a Tribute Summon, also you cannot Special Summon from the Extra Deck, except Fusion Monsters. If a card(s) you control that mentions "Dark Time Wizard" would be destroyed by battle or card effect, you can destroy 1 Token you control that was Special Summoned by this effect instead + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + 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) +end +s.listed_names={TOKEN_SCAPEGOAT,101402001,CARD_DARK_TIME_WIZARD} --"Swift Panther Warrior" +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SCAPEGOAT,0,TYPES_TOKEN,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) end + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spfilter(c,e,tp) + return c:IsCode(101402001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local mmz_count=Duel.GetLocationCount(tp,LOCATION_MZONE) + if mmz_count>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SCAPEGOAT,0,TYPES_TOKEN,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) then + mmz_count=math.min(mmz_count,4) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then mmz_count=1 end + if mmz_count>1 then + mmz_count=Duel.AnnounceNumberRange(tp,1,mmz_count) + end + end + local c=e:GetHandler() + for i=1,mmz_count do + local token=Duel.CreateToken(tp,TOKEN_SCAPEGOAT) + if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then + --For the rest of this turn, these Tokens cannot be Tributed for a Tribute Summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(3304) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_UNRELEASABLE_SUM) + e1:SetValue(1) + e1:SetReset(RESETS_STANDARD_PHASE_END) + token:RegisterEffect(e1,true) + end + end + if Duel.SpecialSummonComplete()>0 then + --If a card(s) you control that mentions "Dark Time Wizard" would be destroyed by battle or card effect, you can destroy 1 Token you control that was Special Summoned by this effect instead + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EFFECT_DESTROY_REPLACE) + e2:SetTarget(s.reptg) + e2:SetOperation(s.repop) + e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) + Duel.RegisterEffect(e2,tp) + if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and 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,1)) 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.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + end + --You cannot Special Summon from the Extra Deck, except Fusion Monsters + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e3:SetTargetRange(1,0) + e3:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsFusionMonster() end) + e3:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e3,tp) +end +function s.repfilter(c,tp) + return c:ListsCode(CARD_DARK_TIME_WIZARD) and c:IsOnField() and c:IsControler(tp) and c:IsFaceup() + and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) +end +function s.desfilter(c,e,tp) + return c:IsOriginalCode(TOKEN_SCAPEGOAT) and c:IsOwner(tp) and c:IsDestructable(e) + and not c:IsStatus(STATUS_DESTROY_CONFIRMED|STATUS_BATTLE_DESTROYED) +end +function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) + and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end + if Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.Hint(HINT_CARD,0,id) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) + local sc=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() + Duel.HintSelection(sc) + e:SetLabelObject(sc) + sc:SetStatus(STATUS_DESTROY_CONFIRMED,true) + return true + end + return false +end +function s.repop(e,tp,eg,ep,ev,re,r,rp) + local sc=e:GetLabelObject() + sc:SetStatus(STATUS_DESTROY_CONFIRMED,false) + Duel.Destroy(sc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/pre-release/c101402057.lua b/pre-release/c101402057.lua new file mode 100644 index 0000000000..0cada4629e --- /dev/null +++ b/pre-release/c101402057.lua @@ -0,0 +1,100 @@ +--艮神鬼門 三千世界 +--Asutrashen Trichiliocosm +--scripted by Naim +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 target any number of face-down cards you control; add "Asutra" cards from your Deck to your hand with different names from each other, except Field Spells, equal to the number of those targeted cards that are still face-down, then send those face-down cards to the GY + 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:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If a card(s) becomes Set on the field, while you control an "Asutra" monster and a face-down card: You can target 1 card on the field; return it to the hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND) + e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2a:SetCode(EVENT_MSET) + e2a:SetRange(LOCATION_FZONE) + e2a:SetCountLimit(1,{id,1}) + e2a:SetCondition(s.rthcon) + e2a:SetTarget(s.rthtg) + e2a:SetOperation(s.rthop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + e2b:SetCondition(aux.AND(s.spsuccesscon,s.rthcon)) + c:RegisterEffect(e2b) + local e2c=e2a:Clone() + e2c:SetCode(EVENT_SSET) + c:RegisterEffect(e2c) + local e2d=e2a:Clone() + e2d:SetCode(EVENT_CHANGE_POS) + e2d:SetCondition(aux.AND(s.changeposcon,s.rthcon)) + c:RegisterEffect(e2d) +end +s.listed_series={SET_ASUTRA} +function s.thfilter(c) + return c:IsSetCard(SET_ASUTRA) and not c:IsFieldSpell() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + local search_group=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if chk==0 then return #search_group>0 and Duel.IsExistingTarget(aux.AND(Card.IsFacedown,Card.IsAbleToGrave),tp,LOCATION_ONFIELD,0,1,nil) end + local max_target_count=search_group:GetClassCount(Card.GetCode) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectTarget(tp,aux.AND(Card.IsFacedown,Card.IsAbleToGrave),tp,LOCATION_ONFIELD,0,1,max_target_count,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,#g,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e):Match(Card.IsFacedown,nil) + local face_down_count=#tg + if face_down_count>0 then + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if g:GetClassCount(Card.GetCode)0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.ShuffleDeck(tp) + if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_ATLANTIS_THE_DRAGON_CITY),tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsExistingMatchingCard(aux.AND(Card.IsEffectMonster,Card.IsNegatableMonster),tp,0,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local sc=Duel.SelectMatchingCard(tp,aux.AND(Card.IsEffectMonster,Card.IsNegatableMonster),tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + Duel.BreakEffect() + --Negate the effects of 1 Effect Monster your opponent controls until the end of this turn + sc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) + end + end +end \ No newline at end of file diff --git a/pre-release/c101402060.lua b/pre-release/c101402060.lua new file mode 100644 index 0000000000..34440c2456 --- /dev/null +++ b/pre-release/c101402060.lua @@ -0,0 +1,68 @@ +--顕現する伝説の都 +--Atlantis Advent +--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) + --This card's name becomes "Umi" while in the Spell & Trap Zone + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetRange(LOCATION_SZONE) + e1:SetValue(CARD_UMI) + c:RegisterEffect(e1) + --During your Main Phase: You can place 1 "Atlantis, the Dragon City" or "Umi" from your Deck face-up in your Field Zone + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetTarget(s.pltg) + e2:SetOperation(s.plop) + c:RegisterEffect(e2) + --If this card is sent to the GY: You can add 1 Level 7 Sea Serpent 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_TO_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_UMI,CARD_ATLANTIS_THE_DRAGON_CITY} +function s.plfilter(c,tp) + return c:IsCode(CARD_ATLANTIS_THE_DRAGON_CITY,CARD_UMI) and c:IsFieldSpell() and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + if sc then + Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) + end +end +function s.thfilter(c) + return c:IsLevel(7) and c:IsRace(RACE_SEASERPENT) 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/c101402062.lua b/pre-release/c101402062.lua new file mode 100644 index 0000000000..e69fe6f5c6 --- /dev/null +++ b/pre-release/c101402062.lua @@ -0,0 +1,96 @@ +--幽獄の時計都市-ダーク・シティ +--Clock Tower Prison City - Dark City +--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) + e0:SetCost(s.actreg) + c:RegisterEffect(e0) + --Each time you Special Summon a Level 8 or higher "Destiny HERO" monster(s): All Warrior monsters you currently control gain 300 ATK + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_FZONE) + e1:SetCondition(s.atkcon) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --During your Main Phase, if this card was activated this turn: You can add 1 "Destiny HERO" monster, or 1 card that mentions a "Destiny HERO" monster's card name, 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_IGNITION) + e2:SetRange(LOCATION_FZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --If this card is destroyed: You can Special Summon 1 "Destiny HERO" monster from your Deck (this is treated as a Special Summon with "Clock Tower Prison") + 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) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DESTINY_HERO} +s.listed_names={75041269} --"Clock Tower Prison" +function s.actreg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.atkconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsLevelAbove(8) and c:IsSetCard(SET_DESTINY_HERO) and c:IsFaceup() +end +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.atkconfilter,1,nil,tp) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_WARRIOR),tp,LOCATION_MZONE,0,nil) + if #g==0 then return end + local c=e:GetHandler() + for tc in g:Iter() do + --All Warrior monsters you currently control gain 300 ATK + tc:UpdateAttack(300,nil,c) + end +end +function s.thfilter(c) + return ((c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster()) or c:ListsCodeWithArchetype(SET_DESTINY_HERO)) 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) + return c:IsSetCard(SET_DESTINY_HERO) 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 \ No newline at end of file diff --git a/pre-release/c101402063.lua b/pre-release/c101402063.lua new file mode 100644 index 0000000000..6dd56ac082 --- /dev/null +++ b/pre-release/c101402063.lua @@ -0,0 +1,60 @@ +--魔救の合緑 +--Adamancipator Mates +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Adamancipator" 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_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --If this card is in your GY: You can place 1 card from your hand on top of the Deck; add this card to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.thcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ADAMANCIPATOR} +function s.thfilter(c) + return c:IsSetCard(SET_ADAMANCIPATOR) and c:IsMonster() 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) +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 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_COST) +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/c101402068.lua b/pre-release/c101402068.lua new file mode 100644 index 0000000000..8676c11236 --- /dev/null +++ b/pre-release/c101402068.lua @@ -0,0 +1,49 @@ +--宇宙的ハリケーン +--Spatial Trunade +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Return up to 2 cards on the field to the hand, then each player places cards from their hand on the bottom of the Deck in any order equal to the number returned to their hand. You can only activate 1 "Spatial Trunade" per turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_EITHER,LOCATION_HAND) +end +function s.thop(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_RTOHAND) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,exc) + if #g==0 then return end + Duel.HintSelection(g) + if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and #g:Match(Card.IsLocation,nil,LOCATION_HAND)>0 then + local ct=g:FilterCount(Card.IsControler,nil,tp) + if ct>0 then Duel.ShuffleHand(tp) end + if #g>ct then Duel.ShuffleHand(1-tp) end + Duel.BreakEffect() + s.place_on_deck_bottom(tp,ct) + s.place_on_deck_bottom(1-tp,#g-ct) + end +end +function s.place_on_deck_bottom(p,ct) + if ct==0 then return end + local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil) + if #g1 then + Duel.SortDeckbottom(p,p,sort_ct) + end +end \ No newline at end of file diff --git a/pre-release/c101402070.lua b/pre-release/c101402070.lua new file mode 100644 index 0000000000..92c68039fa --- /dev/null +++ b/pre-release/c101402070.lua @@ -0,0 +1,68 @@ +--おろかな墓荒らし +--Foolish Graverobber +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Send 1 card that mentions "Dark Time Wizard" from your Deck to the GY, except "Foolish Graverobber", then you can Special Summon 1 monster from either GY to your field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE+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(TIMING_END_PHASE,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --You can banish this card from your GY; Set to your field, 1 Spell/Trap that mentions "Dark Time Wizard" from your GY, except "Foolish Graverobber", or 1 Spell/Trap from your opponent's GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SET) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + e2:SetHintTiming(TIMING_END_PHASE,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_names={CARD_DARK_TIME_WIZARD,id} +function s.tgfilter(c) + return c:ListsCode(CARD_DARK_TIME_WIZARD) and not c:IsCode(id) 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,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_EITHER,LOCATION_GRAVE) +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,0,1,1,nil):GetFirst() + if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(Card.IsCanBeSpecialSummoned),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,0,tp,false,false) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsCanBeSpecialSummoned),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end +function s.setfilter(c,opp) + return c:IsSpellTrap() and c:IsSSetable() and ((c:ListsCode(CARD_DARK_TIME_WIZARD) and not c:IsCode(id)) or c:IsControler(opp)) +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,LOCATION_GRAVE,1,nil,1-tp) end + Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,PLAYER_EITHER,LOCATION_GRAVE) +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,LOCATION_GRAVE,1,1,nil,1-tp) + if #g>0 then + Duel.HintSelection(g) + Duel.SSet(tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101402071.lua b/pre-release/c101402071.lua new file mode 100644 index 0000000000..8cf6e6536d --- /dev/null +++ b/pre-release/c101402071.lua @@ -0,0 +1,98 @@ +--大逆転BOX +--Reversal Box +--scripted by pyrQ +local s,id=GetID() +local COUNTER_REVERSAL_BOX=0x21b +function s.initial_effect(c) + c:EnableCounterPermit(COUNTER_REVERSAL_BOX) + c:SetCounterLimit(COUNTER_REVERSAL_BOX,6) + --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: Roll a six-sided die and place counters on this card equal to the result (max. 6) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DICE+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:SetTarget(s.countertg) + e1:SetOperation(s.counterop) + c:RegisterEffect(e1) + --When a monster effect is activated on your opponent's field, or once per battle, during damage calculation, if an opponent's monster attacks: You can remove 1 counter from this card, then target 1 of those monsters; toss a coin and call it. If you call it right, you can Special Summon 1 monster that mentions "Dark Time Wizard" from your Deck, and if you do, until the end of this turn, change the targeted monster's ATK to 0, also its effects are negated + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_COIN+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DISABLE) + e2a:SetType(EFFECT_TYPE_QUICK_O) + e2a:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2a:SetCode(EVENT_CHAINING) + e2a:SetRange(LOCATION_SZONE) + e2a:SetCondition(s.coincon) + e2a:SetCost(Cost.RemoveCounterFromSelf(COUNTER_REVERSAL_BOX,1)) + e2a:SetTarget(s.cointg) + e2a:SetOperation(s.coinop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_PRE_DAMAGE_CALCULATE) + e2b:SetCondition(function(e,tp,eg) return Duel.GetAttacker():IsControler(1-tp) end) + e2b:SetCost(Cost.AND(Cost.RemoveCounterFromSelf(COUNTER_REVERSAL_BOX,1),Cost.SoftOncePerBattle(id))) + c:RegisterEffect(e2b) +end +s.listed_names={CARD_DARK_TIME_WIZARD} +s.roll_dice=true +s.toss_coin=true +function s.countertg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) + Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,tp,COUNTER_REVERSAL_BOX) +end +function s.counterop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + local die_roll=Duel.TossDice(tp,1) + c:AddCounter(COUNTER_REVERSAL_BOX,die_roll,true) + end +end +function s.coincon(e,tp,eg,ep,ev,re,r,rp) + local trig_loc,trig_ctrl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_CONTROLER) + return re:IsMonsterEffect() and trig_ctrl==1-tp and trig_loc==LOCATION_MZONE and re:GetHandler():IsRelateToEffect(re) +end +function s.cointg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local opp_card=e:GetCode()==EVENT_CHAINING and eg:GetFirst() or Duel.GetAttacker() + if chk==0 then return opp_card:IsCanBeEffectTarget(e) end + Duel.SetTargetCard(opp_card) + Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,opp_card,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,opp_card,1,tp,0) +end +function s.spfilter(c,e,tp) + return c:ListsCode(CARD_DARK_TIME_WIZARD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.coinop(e,tp,eg,ep,ev,re,r,rp) + if Duel.CallCoin(tp) and 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 + local tc=Duel.GetFirstTarget() + 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 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 + and tc:IsRelateToEffect(e) and tc:IsFaceup() then + local c=e:GetHandler() + --Until the end of this turn, change the targeted monster's ATK to 0 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_SET_ATTACK) + e1:SetValue(0) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + --Also its effects are negated + tc:NegateEffects(c,RESET_PHASE|PHASE_END) + end + end +end \ No newline at end of file diff --git a/pre-release/c101402073.lua b/pre-release/c101402073.lua new file mode 100644 index 0000000000..e0061df8db --- /dev/null +++ b/pre-release/c101402073.lua @@ -0,0 +1,72 @@ +--色鬼の蟲毒 +--Asutra Insect Poison +--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:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_series={SET_ASUTRA} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ASUTRA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +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.spfilter(chkc,e,tp) end + local mmz_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + --● Special Summon this card as a Normal Monster (Insect/Tuner/DARK/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster + local b1=mmz_chk and e:IsHasType(EFFECT_TYPE_ACTIVATE) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ASUTRA,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_INSECT,ATTRIBUTE_DARK) + --● Target 1 "Asutra" monster in your GY; Special Summon it + local b2=mmz_chk and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) + if chk==0 then return b1 or b2 end + local cd=e:GetChainData() + cd.choice=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + if cd.choice==1 then + --● Special Summon this card as a Normal Monster (Insect/Tuner/DARK/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster + e:SetProperty(0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + elseif cd.choice==2 then + --● Target 1 "Asutra" monster in your GY; Special Summon it + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local cd=e:GetChainData() + if cd.choice==1 then + --● Special Summon this card as a Normal Monster (Insect/Tuner/DARK/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ASUTRA,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_INSECT,ATTRIBUTE_DARK) then + c:AddMonsterAttribute(TYPE_NORMAL|TYPE_TUNER) + Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) + c:AddMonsterAttributeComplete() + end + if Duel.SpecialSummonComplete()==0 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 + elseif cd.choice==2 then + --● Target 1 "Asutra" monster in your GY; Special Summon it + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c101402074.lua b/pre-release/c101402074.lua new file mode 100644 index 0000000000..463948121b --- /dev/null +++ b/pre-release/c101402074.lua @@ -0,0 +1,73 @@ +--依鬼の呪咆 +--Asutra Cursed Roar +--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:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_series={SET_ASUTRA} +function s.desconfilter(c) + return c:IsSetCard(SET_ASUTRA) and c:IsMonster() and c:IsFaceup() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end + --● Special Summon this card as a Normal Monster (Spellcaster/Tuner/DARK/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ASUTRA,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_SPELLCASTER,ATTRIBUTE_DARK) + --● If you have an "Asutra" monster in your field or GY: Target 1 monster your opponent controls; destroy it + local b2=Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) + and Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) + if chk==0 then return b1 or b2 end + local cd=e:GetChainData() + cd.choice=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + if cd.choice==1 then + --● Special Summon this card as a Normal Monster (Spellcaster/Tuner/DARK/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + e:SetProperty(0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + elseif cd.choice==2 then + --● If you have an "Asutra" monster in your field or GY: Target 1 monster your opponent controls; destroy it + 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_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local cd=e:GetChainData() + if cd.choice==1 then + --● Special Summon this card as a Normal Monster (Spellcaster/Tuner/DARK/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ASUTRA,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_SPELLCASTER,ATTRIBUTE_DARK) then + c:AddMonsterAttribute(TYPE_NORMAL|TYPE_TUNER) + Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) + c:AddMonsterAttributeComplete() + end + if Duel.SpecialSummonComplete()==0 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 + elseif cd.choice==2 then + --● If you have an "Asutra" monster in your field or GY: Target 1 monster your opponent controls; destroy it + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101402075.lua b/pre-release/c101402075.lua new file mode 100644 index 0000000000..a66963587c --- /dev/null +++ b/pre-release/c101402075.lua @@ -0,0 +1,64 @@ +--剣鬼の神域 +--Asutra Divine Domain +--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:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_series={SET_ASUTRA} +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + --● Special Summon this card as a Normal Monster (Aqua/Tuner/WATER/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ASUTRA,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_AQUA,ATTRIBUTE_WATER) + --● When your opponent activates a Spell/Trap Card or effect and they control no face-down cards: Negate that effect + local b2_event,_,event_p,event_v,event_reff=Duel.CheckEvent(EVENT_CHAINING,true) + local b2=b2_event and event_p==1-tp and event_reff:IsSpellTrapEffect() and Chain.IsDisablable(event_v) + and not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) + if chk==0 then return b1 or b2 end + local cd=e:GetChainData() + cd.choice=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + if cd.choice==1 then + --● Special Summon this card as a Normal Monster (Aqua/Tuner/WATER/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + elseif cd.choice==2 then + --● When your opponent activates a Spell/Trap Card or effect and they control no face-down cards: Negate that effect + cd.negate_chain_link=event_v + e:SetCategory(CATEGORY_DISABLE) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,event_reff:GetHandler(),1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local cd=e:GetChainData() + if cd.choice==1 then + --● Special Summon this card as a Normal Monster (Aqua/Tuner/WATER/Level 1/ATK 0/DEF 0) (this card is NOT treated as a Trap), then immediately after this effect resolves, you can Synchro Summon 1 Synchro Monster + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ASUTRA,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_AQUA,ATTRIBUTE_WATER) then + c:AddMonsterAttribute(TYPE_NORMAL|TYPE_TUNER) + Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) + c:AddMonsterAttributeComplete() + end + if Duel.SpecialSummonComplete()==0 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 + elseif cd.choice==2 then + --● When your opponent activates a Spell/Trap Card or effect and they control no face-down cards: Negate that effect + Duel.NegateEffect(cd.negate_chain_link) + end +end \ No newline at end of file diff --git a/pre-release/c101402076.lua b/pre-release/c101402076.lua new file mode 100644 index 0000000000..19604e16e3 --- /dev/null +++ b/pre-release/c101402076.lua @@ -0,0 +1,85 @@ +--海竜神の大渦 +--Daedalus Maelstrom +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When your opponent would Normal or Special Summon a monster(s) while you control "Atlantis, the Dragon City": Negate the Summon, and if you do, destroy that monster(s), then if you control a WATER Link Monster, you can destroy all non-WATER monsters on the field + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) + e1a:SetType(EFFECT_TYPE_ACTIVATE) + e1a:SetCode(EVENT_SUMMON) + e1a:SetCountLimit(1,id) + e1a:SetCondition(s.condition) + e1a:SetTarget(s.target) + e1a:SetOperation(s.activate) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON) + c:RegisterEffect(e1b) + --You can banish this card from your GY and send 1 face-up "Umi" you control to the GY, then target 1 monster your opponent controls; send it to the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE) + 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:SetCost(Cost.AND(Cost.SelfBanish,s.tgcost)) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_names={CARD_ATLANTIS_THE_DRAGON_CITY,CARD_UMI} +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.GetCurrentChain(true)==0 and eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_ATLANTIS_THE_DRAGON_CITY),tp,LOCATION_ONFIELD,0,1,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,#eg,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,#eg,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_ALL,LOCATION_MZONE) +end +function s.desconfilter(c) + return c:IsAttribute(ATTRIBUTE_WATER) and c:IsLinkMonster() +end +function s.desfilter(c) + return c:IsAttributeExcept(ATTRIBUTE_WATER) or c:IsFacedown() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.NegateSummon(eg) + if Duel.Destroy(eg,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + if #g>0 then + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + end +end +function s.tgcostfilter(c) + return c:IsCode(CARD_UMI) and c:IsFaceup() and c:IsAbleToGraveAsCost() +end +function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.tgtg(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:IsAbleToGrave() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoGrave(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101402136.lua b/pre-release/c101402136.lua new file mode 100644 index 0000000000..a9a6aeee6c --- /dev/null +++ b/pre-release/c101402136.lua @@ -0,0 +1,3 @@ +--真紅眼の超越黒竜 +--Red-Eyes Black Dragon Exceed +Duel.LoadCardScriptAlias(101402036) \ No newline at end of file From 24d5dadfe9e5ea8ace16c3f620de18108ec0e551 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 25 Jun 2026 20:02:25 +0300 Subject: [PATCH 4/4] Add files via upload --- archetype_setcode_constants.lua | 6 +- card_counter_constants.lua | 3 +- official/c10307853.lua | 61 ++++++++++++++++ official/c10529441.lua | 64 +++++++++++++++++ official/c10673071.lua | 102 +++++++++++++++++++++++++++ official/c11642993.lua | 86 +++++++++++++++++++++++ official/c11895663.lua | 83 ++++++++++++++++++++++ official/c1259915.lua | 83 ++++++++++++++++++++++ official/c18616294.lua | 83 ++++++++++++++++++++++ official/c18738846.lua | 109 +++++++++++++++++++++++++++++ official/c19951423.lua | 83 ++++++++++++++++++++++ official/c22404570.lua | 71 +++++++++++++++++++ official/c22734799.lua | 75 ++++++++++++++++++++ official/c22912101.lua | 83 ++++++++++++++++++++++ official/c23526128.lua | 90 ++++++++++++++++++++++++ official/c2372506.lua | 101 +++++++++++++++++++++++++++ official/c23856331.lua | 82 ++++++++++++++++++++++ official/c24088928.lua | 88 +++++++++++++++++++++++ official/c24461358.lua | 75 ++++++++++++++++++++ official/c24749710.lua | 92 ++++++++++++++++++++++++ official/c25687946.lua | 107 ++++++++++++++++++++++++++++ official/c30109445.lua | 74 ++++++++++++++++++++ official/c31822037.lua | 77 ++++++++++++++++++++ official/c32044675.lua | 74 ++++++++++++++++++++ official/c33166263.lua | 88 +++++++++++++++++++++++ official/c33599853.lua | 53 ++++++++++++++ official/c36709484.lua | 75 ++++++++++++++++++++ official/c37432075.lua | 54 ++++++++++++++ official/c37654623.lua | 89 +++++++++++++++++++++++ official/c38776201.lua | 66 ++++++++++++++++++ official/c433377.lua | 101 +++++++++++++++++++++++++++ official/c43989315.lua | 68 ++++++++++++++++++ official/c44001993.lua | 89 +++++++++++++++++++++++ official/c45223540.lua | 55 +++++++++++++++ official/c46072770.lua | 93 +++++++++++++++++++++++++ official/c4611341.lua | 71 +++++++++++++++++++ official/c46955132.lua | 90 ++++++++++++++++++++++++ official/c47914440.lua | 57 +++++++++++++++ official/c50073633.lua | 95 +++++++++++++++++++++++++ official/c50147815.lua | 69 ++++++++++++++++++ official/c50251045.lua | 104 +++++++++++++++++++++++++++ official/c51869363.lua | 92 ++++++++++++++++++++++++ official/c5559570.lua | 57 +++++++++++++++ official/c57294268.lua | 91 ++++++++++++++++++++++++ official/c58036097.lua | 73 +++++++++++++++++++ official/c5833929.lua | 76 ++++++++++++++++++++ official/c58809685.lua | 91 ++++++++++++++++++++++++ official/c58916810.lua | 80 +++++++++++++++++++++ official/c59138498.lua | 108 ++++++++++++++++++++++++++++ official/c59921227.lua | 97 ++++++++++++++++++++++++++ official/c61082944.lua | 89 +++++++++++++++++++++++ official/c62104532.lua | 66 ++++++++++++++++++ official/c63926180.lua | 99 ++++++++++++++++++++++++++ official/c64049762.lua | 117 +++++++++++++++++++++++++++++++ official/c65861210.lua | 97 ++++++++++++++++++++++++++ official/c67216732.lua | 84 ++++++++++++++++++++++ official/c6772168.lua | 67 ++++++++++++++++++ official/c70383419.lua | 88 +++++++++++++++++++++++ official/c70405001.lua | 74 ++++++++++++++++++++ official/c71222649.lua | 118 +++++++++++++++++++++++++++++++ official/c7594154.lua | 107 ++++++++++++++++++++++++++++ official/c75983808.lua | 98 ++++++++++++++++++++++++++ official/c78449284.lua | 96 +++++++++++++++++++++++++ official/c7894706.lua | 91 ++++++++++++++++++++++++ official/c79561872.lua | 92 ++++++++++++++++++++++++ official/c82344137.lua | 99 ++++++++++++++++++++++++++ official/c83319154.lua | 67 ++++++++++++++++++ official/c83566725.lua | 89 +++++++++++++++++++++++ official/c84031736.lua | 96 +++++++++++++++++++++++++ official/c84288367.lua | 87 +++++++++++++++++++++++ official/c84401954.lua | 83 ++++++++++++++++++++++ official/c85257384.lua | 81 +++++++++++++++++++++ official/c85523502.lua | 120 ++++++++++++++++++++++++++++++++ official/c86132414.lua | 101 +++++++++++++++++++++++++++ official/c86319972.lua | 88 +++++++++++++++++++++++ official/c96345184.lua | 93 +++++++++++++++++++++++++ official/c97254001.lua | 112 +++++++++++++++++++++++++++++ official/c97462632.lua | 78 +++++++++++++++++++++ official/c98476659.lua | 51 ++++++++++++++ official/c98684220.lua | 105 ++++++++++++++++++++++++++++ official/c99199231.lua | 87 +++++++++++++++++++++++ official/c99311889.lua | 67 ++++++++++++++++++ 82 files changed, 6817 insertions(+), 4 deletions(-) create mode 100644 official/c10307853.lua create mode 100644 official/c10529441.lua create mode 100644 official/c10673071.lua create mode 100644 official/c11642993.lua create mode 100644 official/c11895663.lua create mode 100644 official/c1259915.lua create mode 100644 official/c18616294.lua create mode 100644 official/c18738846.lua create mode 100644 official/c19951423.lua create mode 100644 official/c22404570.lua create mode 100644 official/c22734799.lua create mode 100644 official/c22912101.lua create mode 100644 official/c23526128.lua create mode 100644 official/c2372506.lua create mode 100644 official/c23856331.lua create mode 100644 official/c24088928.lua create mode 100644 official/c24461358.lua create mode 100644 official/c24749710.lua create mode 100644 official/c25687946.lua create mode 100644 official/c30109445.lua create mode 100644 official/c31822037.lua create mode 100644 official/c32044675.lua create mode 100644 official/c33166263.lua create mode 100644 official/c33599853.lua create mode 100644 official/c36709484.lua create mode 100644 official/c37432075.lua create mode 100644 official/c37654623.lua create mode 100644 official/c38776201.lua create mode 100644 official/c433377.lua create mode 100644 official/c43989315.lua create mode 100644 official/c44001993.lua create mode 100644 official/c45223540.lua create mode 100644 official/c46072770.lua create mode 100644 official/c4611341.lua create mode 100644 official/c46955132.lua create mode 100644 official/c47914440.lua create mode 100644 official/c50073633.lua create mode 100644 official/c50147815.lua create mode 100644 official/c50251045.lua create mode 100644 official/c51869363.lua create mode 100644 official/c5559570.lua create mode 100644 official/c57294268.lua create mode 100644 official/c58036097.lua create mode 100644 official/c5833929.lua create mode 100644 official/c58809685.lua create mode 100644 official/c58916810.lua create mode 100644 official/c59138498.lua create mode 100644 official/c59921227.lua create mode 100644 official/c61082944.lua create mode 100644 official/c62104532.lua create mode 100644 official/c63926180.lua create mode 100644 official/c64049762.lua create mode 100644 official/c65861210.lua create mode 100644 official/c67216732.lua create mode 100644 official/c6772168.lua create mode 100644 official/c70383419.lua create mode 100644 official/c70405001.lua create mode 100644 official/c71222649.lua create mode 100644 official/c7594154.lua create mode 100644 official/c75983808.lua create mode 100644 official/c78449284.lua create mode 100644 official/c7894706.lua create mode 100644 official/c79561872.lua create mode 100644 official/c82344137.lua create mode 100644 official/c83319154.lua create mode 100644 official/c83566725.lua create mode 100644 official/c84031736.lua create mode 100644 official/c84288367.lua create mode 100644 official/c84401954.lua create mode 100644 official/c85257384.lua create mode 100644 official/c85523502.lua create mode 100644 official/c86132414.lua create mode 100644 official/c86319972.lua create mode 100644 official/c96345184.lua create mode 100644 official/c97254001.lua create mode 100644 official/c97462632.lua create mode 100644 official/c98476659.lua create mode 100644 official/c98684220.lua create mode 100644 official/c99199231.lua create mode 100644 official/c99311889.lua diff --git a/archetype_setcode_constants.lua b/archetype_setcode_constants.lua index 39eec58db9..c49451c073 100644 --- a/archetype_setcode_constants.lua +++ b/archetype_setcode_constants.lua @@ -604,13 +604,13 @@ SET_END_OF_THE_WORLD = 0x1d1 SET_FAIRY_TAIL = 0x1d2 SET_ELFNOTE = 0x1d0 SET_GMX = 0x1d4 ---Released but the official English name is unconfirmed SET_CLOWN_CREW = 0x1d3 -SET_DARK_TUNER = 0x1d5 ---Pre-release archetypes SET_BLITZCLIQUE = 0x1d6 SET_THEOREALIZE = 0x1d7 SET_ALEISTER = 0x1d8 +--Released but the official English name is unconfirmed +SET_DARK_TUNER = 0x1d5 +--Pre-release archetypes SET_WHITE_KNIGHT_NIGHT = 0x1d9 SET_DAEDALUS = 0x1da SET_ASUTRA = 0x1db diff --git a/card_counter_constants.lua b/card_counter_constants.lua index 93b8fd80c2..8763607e1c 100644 --- a/card_counter_constants.lua +++ b/card_counter_constants.lua @@ -50,6 +50,7 @@ CARD_GRANDPA_DEMETTO = 44190146 CARD_HARMONIC_OSCILLATION = 31531170 CARD_HARPIE_LADY = 76812113 CARD_HARPIE_LADY_SISTERS = 12206212 +CARD_HIDEOUT_IN_THE_SKY_COULOMB = 37654623 CARD_INFERNOBLE_CHARLES = 77656797 CARD_INVOCATION = 74063034 CARD_JACK_KNIGHT = 90876561 @@ -61,6 +62,7 @@ CARD_KING_KNIGHT = 64788463 CARD_KING_SARCOPHAGUS = 16528181 CARD_KURIBOH = 40640057 CARD_LABRYNTH_LABYRINTH = 33407125 +CARD_LIGHT_AND_DARKNESS_RITUAL = 33599853 CARD_LIGHT_BARRIER = 73206827 CARD_MACRO_COSMOS = 30241314 CARD_MAGICAL_MIDBREAKER = 71650854 @@ -94,7 +96,6 @@ CARD_REGULUS_THE_PRINCE_OF_ENDYMION = 96228804 CARD_REVEALER_ICEBARRIER = 18319762 CARD_REVERSAL_OF_FATE = 36690018 CARD_RIKKA_KONKON = 76869711 -CARD_RITUAL_OF_LIGHT_AND_DARKNESS = 101305044 CARD_SALAMANGREAT_SANCTUARY = 1295111 CARD_SANCTUARY_SKY = 56433456 CARD_SANGA_OF_THE_THUNDER = 25955164 diff --git a/official/c10307853.lua b/official/c10307853.lua new file mode 100644 index 0000000000..ab5c05c1a2 --- /dev/null +++ b/official/c10307853.lua @@ -0,0 +1,61 @@ +--護石の作庭 +--Protective Stone Gardenscaping +--scripted by Naim +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) + --While you have 5 cards in your Spell & Trap Zone, any battle damage a player takes is halved, also once per turn, you can activate 1 Continuous Trap Card the turn it was Set + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD) + e1a:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1a:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) + e1a:SetRange(LOCATION_SZONE) + e1a:SetTargetRange(1,1) + e1a:SetCondition(function(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_STZONE,0)==5 end) + e1a:SetValue(HALF_DAMAGE) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetDescription(aux.Stringid(id,0)) + e1b:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e1b:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e1b:SetTargetRange(LOCATION_SZONE,0) + e1b:SetCountLimit(1) + c:RegisterEffect(e1b) + --During the Standby Phase: You can reveal 5 Continuous Traps with different names from your Deck, your opponent randomly picks 1 for you to Set on your field, also shuffle the rest into the Deck. You can only use this effect of "Protective Stone Gardenscaping" once per turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SET) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(function() return Duel.IsStandbyPhase() end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + e2:SetHintTiming(TIMING_STANDBY_PHASE) + c:RegisterEffect(e2) +end +function s.setfilter(c) + return c:IsContinuousTrap() and c:IsSSetable() and not c:IsPublic() +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) + if chk==0 then return #g>=5 and g:GetClassCount(Card.GetCode)>=5 end + Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) + if #g<5 then return end + local rg=aux.SelectUnselectGroup(g,e,tp,5,5,aux.dncheck,1,tp,HINTMSG_CONFIRM) + Duel.ConfirmCards(1-tp,rg) + Duel.ShuffleDeck(tp) + local sg=rg:RandomSelect(1-tp,1) + if #sg>0 then + Duel.DisableShuffleCheck() + Duel.SSet(tp,sg,tp,false) + end +end \ No newline at end of file diff --git a/official/c10529441.lua b/official/c10529441.lua new file mode 100644 index 0000000000..1ed0c62546 --- /dev/null +++ b/official/c10529441.lua @@ -0,0 +1,64 @@ +--嗚呼な落とし穴 +--Oh my Trap Hole! +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When a monster effect is activated on your opponent's field during the turn they Special Summoned a monster(s): Destroy the monster that activated that effect, then destroy all opponent's cards in its adjacent Monster Zones and Spell & Trap Zones (if any) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Keep track of a player Special Summoning a monster + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_SPSUMMON_SUCCESS) + ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + for p=0,1 do + if eg:IsExists(Card.IsSummonPlayer,1,nil,p) then + Duel.RegisterFlagEffect(p,id,RESET_PHASE|PHASE_END,0,1) + end + end + end) + Duel.RegisterEffect(ge1,0) + end) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + if not (Duel.HasFlagEffect(1-tp,id) and re:IsMonsterEffect()) then return false end + local trig_loc,trig_ctrl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_CONTROLER) + return trig_ctrl==1-tp and trig_loc==LOCATION_MZONE and re:GetHandler():IsRelateToEffect(re) +end +function s.adjacentfilter(c,tp,rc,seq) + if c:IsControler(tp) then return false end + if c:IsLocation(LOCATION_SZONE) then + return rc:IsInMainMZone() and rc:GetColumnGroup():IsContains(c) and c:IsControler(rc:GetControler()) + elseif c:IsLocation(LOCATION_MZONE) then + if c:IsInExtraMZone() or rc:IsInExtraMZone() then + return rc:GetColumnGroup():IsContains(c) + else + return c:IsSequence(seq-1,seq+1) and c:IsControler(rc:GetControler()) + end + end + return false +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local rc=re:GetHandler() + rc:CreateEffectRelation(e) + local g=rc:GetColumnGroup(1,1):Match(s.adjacentfilter,nil,tp,rc,rc:GetSequence()) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g+rc,#g+1,tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if not rc:IsRelateToEffect(re) then return end + local g=rc:GetColumnGroup(1,1):Match(s.adjacentfilter,nil,tp,rc,rc:GetSequence()) + if Duel.Destroy(rc,REASON_EFFECT)>0 and #g>0 then + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c10673071.lua b/official/c10673071.lua new file mode 100644 index 0000000000..7169365078 --- /dev/null +++ b/official/c10673071.lua @@ -0,0 +1,102 @@ +--人工神霊ヴィラカム +--Virakam the Artificial Spirit +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you have an "Aleister" monster in your field or GY: 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 Special Summoned: You can Set 1 "Invocation", or 1 Spell that mentions it, from your Deck + 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_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) + --When your opponent activates a card or effect in response to the activation of your Fusion Monster's effect (Quick Effect): You can banish this card from the field, and if you do, negate that opponent's effect, and if you do that, banish that card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_REMOVE+CATEGORY_DISABLE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_CHAINING) + 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_names={CARD_INVOCATION} +s.listed_series={SET_ALEISTER} +function s.spconfilter(c) + return c:IsSetCard(SET_ALEISTER) and c:IsMonster() and c:IsFaceup() +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,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.setfilter(c) + return (c:IsCode(CARD_INVOCATION) or (c:IsSpell() and c:ListsCode(CARD_INVOCATION))) 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_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) +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_DECK,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end +end +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local chainlink=Duel.GetCurrentChain(true)-1 + if not (chainlink>0 and Duel.IsChainDisablable(ev) and ep==1-tp) then return false end + local trig_player,trig_type=Duel.GetChainInfo(chainlink,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_TYPE) + return trig_player==tp and (trig_type&TYPE_FUSION)>0 +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local rc=re:GetHandler() + local relation=rc:IsRelateToEffect(re) + if chk==0 then return c:IsAbleToRemove() and (rc:IsAbleToRemove(tp) + or (not relation and Duel.IsPlayerCanRemove(tp))) end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) + if relation then + rc:CreateEffectRelation(e) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,Group.FromCards(c,rc),1,tp,0) + else + Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,rc:GetPreviousControler(),rc:GetPreviousLocation()) + end +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_REMOVED) + and Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c11642993.lua b/official/c11642993.lua new file mode 100644 index 0000000000..36db92087b --- /dev/null +++ b/official/c11642993.lua @@ -0,0 +1,86 @@ +--S-Force ソート・ワールド +--S-Force Sorted World +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + e0:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e0) + --If you would banish a card(s) from the hand to activate the effect of an "S-Force" monster you control, you can send 1 "S-Force" card from your Deck to the GY instead, except "S-Force Sorted World" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_COST_REPLACE) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(1,0) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.repcon) + e1:SetValue(s.repval) + e1:SetOperation(s.repop) + c:RegisterEffect(e1) + --If another card(s) is banished: You can target 1 card in your opponent's field or GY; banish it, then you can move 1 "S-Force" monster you control to another of your Main Monster Zones + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_REMOVE) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) end) + e2:SetTarget(s.bantg) + e2:SetOperation(s.banop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_S_FORCE} +function s.repcostfilter(c,extracon,base,e,tp,eg,ep,ev,re,r,rp) + return c:IsSetCard(SET_S_FORCE) and not c:IsCode(id) and c:IsAbleToGraveAsCost() + and (not extracon or extracon(base,e,tp,eg,ep,ev,re,r,rp,c)) +end +function s.repcon(e) + return Duel.IsExistingMatchingCard(s.repcostfilter,e:GetHandlerPlayer(),LOCATION_DECK,0,1,nil) +end +function s.repval(base,extracon,e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local c=e:GetHandler() + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_S_FORCE) + and Duel.IsExistingMatchingCard(s.repcostfilter,tp,LOCATION_DECK,0,1,nil,extracon,base,e,tp,eg,ep,ev,re,r,rp) + end + return Chain.IsTriggeringControler(0,tp) and Chain.IsTriggeringLocation(0,LOCATION_MZONE) + and Chain.IsTriggeringPosition(0,POS_FACEUP) and Chain.IsTriggeringSetcode(0,SET_S_FORCE) + and Duel.IsExistingMatchingCard(s.repcostfilter,tp,LOCATION_DECK,0,1,nil,extracon,base,e,tp,eg,ep,ev,re,r,rp) +end +function s.repop(base,extracon,e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.repcostfilter,tp,LOCATION_DECK,0,1,1,nil,extracon,base,e,tp,eg,ep,ev,re,r,rp) + Duel.SendtoGrave(g,REASON_COST) +end +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,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) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_REMOVED) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_S_FORCE),tp,LOCATION_MZONE,0,nil) + if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local sc=g:Select(tp,1,1,nil):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) + local zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0) + Duel.BreakEffect() + if tc:IsImmuneToEffect(e) then return end + Duel.MoveSequence(sc,math.log(zone,2)) + end +end diff --git a/official/c11895663.lua b/official/c11895663.lua new file mode 100644 index 0000000000..ae1e3f1487 --- /dev/null +++ b/official/c11895663.lua @@ -0,0 +1,83 @@ +--エミ・ブリッツクリーク +--Emi Blitzclique +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If this card is added to your hand, except by drawing it: You can reveal it, then target 1 card on the field; destroy it, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_TO_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e) return not e:GetHandler():IsReason(REASON_DRAW) end) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can add 1 "Blitzclique" Trap from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_BLITZCLIQUE} +function s.desfilter(c,tp) + return Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +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.GetLocationCount(tp,LOCATION_MZONE)>0 then + 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 + --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + 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 (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thfilter(c) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsTrap() 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/c1259915.lua b/official/c1259915.lua new file mode 100644 index 0000000000..32e9554083 --- /dev/null +++ b/official/c1259915.lua @@ -0,0 +1,83 @@ +--三幻魔の霹靂 +--Sacred Beasts Thunderclap +--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 place 2 "Sacred Beasts Thunderclap" from your hand, Deck, and/or GY face-up on your field, then you can reveal 1 Level 10 "Sacred Beast" monster in your hand, then place 1 "Fallen Paradise of the Sacred Beasts" from your Deck face-up in your Field Zone + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --During your opponent's End Phase, if this card is in your GY: You can add it to your 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:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={id,65861210} --"Fallen Paradise of the Sacred Beasts" +s.listed_series={SET_SACRED_BEAST} +function s.selfplfilter(c,tp) + return c:IsCode(id) and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=2 + and Duel.IsExistingMatchingCard(s.selfplfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,nil,tp) end +end +function s.revealfilter(c) + return c:IsLevel(10) and c:IsSetCard(SET_SACRED_BEAST) and not c:IsPublic() +end +function s.fieldplfilter(c,tp) + return c:IsCode(65861210) and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)<2 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.selfplfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,2,nil,tp) + if #g==2 then + Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) + Duel.MoveToField(g:GetNext(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) + if Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_HAND,0,1,nil) + and Duel.IsExistingMatchingCard(s.fieldplfilter,tp,LOCATION_DECK,0,1,nil,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rg=Duel.SelectMatchingCard(tp,s.revealfilter,tp,LOCATION_HAND,0,1,1,nil) + if #rg==0 then return end + Duel.BreakEffect() + Duel.ConfirmCards(1-tp,rg) + Duel.ShuffleHand(tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.fieldplfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + if sc then + Duel.BreakEffect() + Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) + end + end + 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/c18616294.lua b/official/c18616294.lua new file mode 100644 index 0000000000..31d97d3fbd --- /dev/null +++ b/official/c18616294.lua @@ -0,0 +1,83 @@ +--グレイレイヤー +--Gray Layer +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can Tribute this card and reveal 1 Machine monster in your hand; add 1 Machine monster from your Deck to your hand with a different Attribute than the revealed monster, then if you added a monster with 1200 or less ATK, you can Special Summon 1 Machine monster from 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_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.AND(Cost.SelfTribute,Cost.Reveal(s.revealfilter,false,1,1,function(e,tp,og) e:SetLabel(og:GetFirst():GetAttribute()) end))) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If a monster(s) in your possession is destroyed by card effect, while this card is in your GY: You can banish this card; destroy 1 card on the field + 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_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.descon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +function s.revealfilter(c,e,tp) + return c:IsRace(RACE_MACHINE) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttribute()) +end +function s.thfilter(c,attr) + return c:IsRace(RACE_MACHINE) and c:IsAttributeExcept(attr) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +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,e:GetLabel()):GetFirst() + if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,sc) + Duel.ShuffleHand(tp) + if sc:IsAttackBelow(1200) and Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,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_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.BreakEffect() + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + end +end +function s.desconfilter(c,tp) + return (c:IsPreviousLocation(LOCATION_MZONE) or (c:IsMonsterCard() and not c:IsPreviousLocation(LOCATION_ONFIELD))) + and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.desconfilter,1,nil,tp) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,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,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c18738846.lua b/official/c18738846.lua new file mode 100644 index 0000000000..9e4a313117 --- /dev/null +++ b/official/c18738846.lua @@ -0,0 +1,109 @@ +--繋星の雷后 +--Astrolasma Urania +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --You can Special Summon this card (from your hand) by returning up to 2 monsters you control to the hand. You can only Special Summon "Astrolasma Urania" once per turn this way + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If this card is Special Summoned: You can reveal any number of monsters with different Levels in your hand, then target that many face-up cards your opponent controls; negate their effects + 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:SetCost(s.discost) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --If this card on the field is destroyed by card effect and sent to the GY: 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_DESTROYED) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.thcon) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local g=Duel.GetMatchingGroup(Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,nil) + return #g>0 and Duel.GetMZoneCount(tp,g)>0 +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.GetMatchingGroup(Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,nil) + local sg=aux.SelectUnselectGroup(g,e,tp,1,2,aux.ChkfMMZ(1),1,tp,HINTMSG_RTOHAND,nil,nil,true) + if #sg>0 then + e:SetLabelObject(sg) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if g then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_COST) + end +end +function s.discostfilter(c) + return c:IsMonster() and c:HasLevel() and not c:IsPublic() +end +function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.discostfilter,tp,LOCATION_HAND,0,nil) + local max_target_count=Duel.GetTargetCount(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) + if chk==0 then return #g>0 and max_target_count>0 end + local max_reveal_count=math.min(max_target_count,g:GetClassCount(Card.GetLevel)) + local sg=aux.SelectUnselectGroup(g,e,tp,1,max_reveal_count,aux.dpcheck(Card.GetLevel),1,tp,HINTMSG_CONFIRM) + Duel.ConfirmCards(1-tp,sg) + Duel.ShuffleHand(tp) + e:SetLabel(#sg) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end + if chk==0 then return true end + local target_count=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,target_count,target_count,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,target_count,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==0 then return end + local c=e:GetHandler() + for tc in tg:Iter() do + --Negate their effects + tc:NegateEffects(c,nil,true) + end +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) and c:IsLocation(LOCATION_GRAVE) +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/c19951423.lua b/official/c19951423.lua new file mode 100644 index 0000000000..dccb928814 --- /dev/null +++ b/official/c19951423.lua @@ -0,0 +1,83 @@ +--S-Force シグナス +--S-Force Signus +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If this card is Normal or Special Summoned: You can add 1 "S-Force" monster from your Deck to your hand, except "S-Force Signus", then if an opponent's monster is in this card's column, you can draw 1 card + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DRAW) + 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) + --If an opponent's monster activates its effect in the same column as your monster: You can make all "S-Force" monsters you currently control gain 1000 ATK + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.atkcon) + e2:SetTarget(s.atktg) + e2:SetOperation(s.atkop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_S_FORCE} +function s.thfilter(c) + return c:IsSetCard(SET_S_FORCE) and c:IsMonster() 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.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,1,tp,0) +end +function s.columnfilter(c,opp) + return c:IsLocation(LOCATION_MZONE) and c:IsControler(opp) +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 or Duel.SendtoHand(g,nil,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_HAND) then return end + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.ShuffleDeck(tp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.IsPlayerCanDraw(tp,1) + and c:GetColumnGroup():IsExists(s.columnfilter,1,nil,1-tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end +end +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + local trig_ctrl,trig_loc,trig_seq=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) + return trig_ctrl==1-tp and trig_loc==LOCATION_MZONE + and Duel.IsExistingMatchingCard(Card.IsColumn,tp,LOCATION_MZONE,0,1,nil,trig_seq,1-tp,LOCATION_MZONE) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_S_FORCE),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.IsSetCard,SET_S_FORCE),tp,LOCATION_MZONE,0,nil) + for tc in g:Iter() do + --All "S-Force" monsters you currently control gain 1000 ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(1000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c22404570.lua b/official/c22404570.lua new file mode 100644 index 0000000000..3cfa09a8d2 --- /dev/null +++ b/official/c22404570.lua @@ -0,0 +1,71 @@ +--終刻なる獄神影 +--Power Patron Shadows of the End Times +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "Power Patron" monster from your hand, face-up Extra Deck, or GY, then you can apply any of these effects, in sequence, based on the number of different card types (Fusion, Synchro, Xyz) you control + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) +end +s.listed_series={SET_POWER_PATRON} +function s.spfilter(c,e,tp) + if not (c:IsSetCard(SET_POWER_PATRON) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if c:IsLocation(LOCATION_HAND|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_HAND|LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_EXTRA|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_DECK|LOCATION_ONFIELD|LOCATION_HAND) +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_HAND|LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then + local card_type_count=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsMonster),tp,LOCATION_MZONE,0,nil):GetBinClassCount(function(c) return c:GetType()&(TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ) end) + if card_type_count==0 then return end + local opp=1-tp + local break_chk=false + local opp_decktop3=Duel.GetDecktopGroup(opp,3) + local opp_field=Duel.GetFieldGroup(opp,LOCATION_ONFIELD,0) + local opp_hand=Duel.GetFieldGroup(opp,LOCATION_HAND,0) + --● 1+: Banish (face-down) the top 3 cards of your opponent's Deck + if card_type_count>=1 and #opp_decktop3==3 and opp_decktop3:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)==3 + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.DisableShuffleCheck() + Duel.BreakEffect() + if Duel.Remove(opp_decktop3,POS_FACEDOWN,REASON_EFFECT)>0 then break_chk=true end + end + --● 2+: Banish (face-down) 1 card your opponent controls + if card_type_count>=2 and #opp_field>0 and opp_field:IsExists(Card.IsAbleToRemove,1,nil,tp,POS_FACEDOWN) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=opp_field:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil,tp,POS_FACEDOWN) + if #g>0 then + Duel.HintSelection(g) + if break_chk then Duel.BreakEffect() end + if Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)>0 then break_chk=true end + end + end + --● 3: Banish (face-down) 1 random card from your opponent's hand + if card_type_count==3 and #opp_hand>0 and opp_hand:IsExists(Card.IsAbleToRemove,1,nil,tp,POS_FACEDOWN) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + local g=opp_hand:Match(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN):RandomSelect(tp,1) + if #g>0 then + if break_chk then Duel.BreakEffect() end + Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) + end + end + end +end \ No newline at end of file diff --git a/official/c22734799.lua b/official/c22734799.lua new file mode 100644 index 0000000000..9de3edcbcb --- /dev/null +++ b/official/c22734799.lua @@ -0,0 +1,75 @@ +--三幻魔の操世者 +--The Orchestrator of the Sacred Beasts +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --You can reveal this card in your hand; discard 1 card, and if you do, Special Summon 1 "Sacred Beast" monster from your hand in Defense Position, except a Level 8 monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.sptg(LOCATION_HAND)) + e1:SetOperation(s.spop(LOCATION_HAND)) + c:RegisterEffect(e1) + --You can discard 1 card; Special Summon 1 "Sacred Beast" monster from your hand or GY in Defense Position, except a Level 8 monster or the discarded card + local e2=e1:Clone() + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.Discard(nil,false,1,1,function(e,tp,og) local oc=og:GetFirst() oc:CreateEffectRelation(e) e:SetLabelObject(oc) end)) + e2:SetTarget(s.sptg(LOCATION_HAND|LOCATION_GRAVE)) + e2:SetOperation(s.spop(LOCATION_HAND|LOCATION_GRAVE)) + c:RegisterEffect(e2) + --You can banish this card from your GY; Special Summon 1 "Sacred Beast" monster from your GY in Defense Postion, except a Level 8 monster + local e3=e2:Clone() + e3:SetDescription(aux.Stringid(id,2)) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.sptg(LOCATION_GRAVE)) + e3:SetOperation(s.spop(LOCATION_GRAVE)) + c:RegisterEffect(e3) +end +s.listed_series={SET_SACRED_BEAST} +function s.discardfilter(c,e,tp) + return c:IsDiscardable(REASON_EFFECT) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,c,e,tp) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_SACRED_BEAST) and not c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP_DEFENSE) +end +function s.sptg(summon_location) + return function(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end + if summon_location==LOCATION_HAND then + return Duel.IsExistingMatchingCard(s.discardfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + else + return Duel.IsExistingMatchingCard(s.spfilter,tp,summon_location,0,1,e:GetHandler(),e,tp) + end + end + if summon_location==LOCATION_HAND then + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,summon_location) + end +end +function s.spop(summon_location) + return function(e,tp,eg,ep,ev,re,r,rp) + if summon_location==LOCATION_HAND and Duel.DiscardHand(tp,s.discardfilter,1,1,REASON_EFFECT|REASON_DISCARD,nil,e,tp)<0 then return end + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local exc=nil + if summon_location==LOCATION_HAND|LOCATION_GRAVE then + local cost_card=e:GetLabelObject() + exc=cost_card:IsRelateToEffect(e) and cost_card or nil + end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,summon_location,0,1,1,exc,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,true,POS_FACEUP_DEFENSE)>0 then + sc:CompleteProcedure() + end + end +end \ No newline at end of file diff --git a/official/c22912101.lua b/official/c22912101.lua new file mode 100644 index 0000000000..e6c1787a5d --- /dev/null +++ b/official/c22912101.lua @@ -0,0 +1,83 @@ +--サージ・ブリッツクリーク +--Surge Blitzclique +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --You can reveal this card in your hand, then target 1 monster on the field; destroy it, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can add 1 "Blitzclique" monster from your Deck to your hand, except "Surge Blitzclique" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_BLITZCLIQUE} +function s.desfilter(c,tp) + return Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +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.GetLocationCount(tp,LOCATION_MZONE)>0 then + 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 + --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + 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 (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thfilter(c) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsMonster() 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) +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/c23526128.lua b/official/c23526128.lua new file mode 100644 index 0000000000..228105f71b --- /dev/null +++ b/official/c23526128.lua @@ -0,0 +1,90 @@ +--雷盟-リターンストローク +--Blitzclique - Return Stroke +--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) + --"Blitzclique" monsters you control cannot be destroyed by your opponent's card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_BLITZCLIQUE) end) + e1:SetValue(aux.indoval) + c:RegisterEffect(e1) + --When your opponent activates a Spell Card or effect: You can return 1 "Blitzclique" monster you control to the hand; negate that effect, and if you do, destroy that card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(s.discon) + e2:SetCost(s.discost) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --You can banish this card from your GY, then target 1 "Blitzclique" monster in your field or GY; return it to the hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND) + 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:SetCost(Cost.SelfBanish) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +s.listed_series={SET_BLITZCLIQUE} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsSpellEffect() and Duel.IsChainDisablable(ev) +end +function s.discostfilter(c) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsFaceup() and c:IsAbleToHandAsCost() +end +function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.discostfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectMatchingCard(tp,s.discostfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_COST) +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.thfilter(c) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsMonster() 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_MZONE|LOCATION_GRAVE) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c2372506.lua b/official/c2372506.lua new file mode 100644 index 0000000000..7bdaea1c5b --- /dev/null +++ b/official/c2372506.lua @@ -0,0 +1,101 @@ +--カオスシルクハット +--Chaos Hats +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --When your opponent activates a monster effect, or a Normal Spell/Trap Card: Choose 3 Spells/Traps with different names from each other from your Deck and 1 monster in your Main Monster Zone that mentions "Ritual of Light and Darkness". Special Summon the chosen Spells/Traps in face-down Defense Position as Normal Monsters (Spellcaster/DARK/Level 8/ATK 0/DEF 0) and their names become "Chaos Hats" (even while face-down), Set the chosen monster, and shuffle them on the field, then your opponent's activated effect becomes "Destroy 1 face-down Defense Position monster your opponent controls" + 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_CHAINING) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={CARD_LIGHT_AND_DARKNESS_RITUAL,id} +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and (re:IsMonsterEffect() or (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsNormalSpellTrap())) +end +function s.setfilter(c) + return c:ListsCode(CARD_LIGHT_AND_DARKNESS_RITUAL) and c:IsCanTurnSet() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_DECK,0,nil) + return aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,0) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,nil,TYPE_MONSTER|TYPE_NORMAL,0,0,8,RACE_SPELLCASTER,ATTRIBUTE_DARK,POS_FACEDOWN_DEFENSE) + and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_MMZONE,0,1,nil) + end + --Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_DECK,0,nil) + local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_SPSUMMON) + if #sg~=3 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local mc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_MMZONE,0,1,1,nil):GetFirst() + if not mc or mc:IsImmuneToEffect(e) then return end + Duel.HintSelection(mc) + for sc in sg:Iter() do + --Special Summon the chosen Spells/Traps in face-down Defense Position as Normal Monsters (Spellcaster/DARK/Level 8/ATK 0/DEF 0) and their names become "Chaos Hats" (even while face-down) + local e1=Effect.CreateEffect(sc) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_TYPE) + e1:SetValue(TYPE_NORMAL|TYPE_MONSTER) + e1:SetReset(RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_OVERLAY) + sc:RegisterEffect(e1,true) + local e2=e1:Clone() + e2:SetCode(EFFECT_CHANGE_RACE) + e2:SetValue(RACE_SPELLCASTER) + sc:RegisterEffect(e2,true) + local e3=e1:Clone() + e3:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e3:SetValue(ATTRIBUTE_DARK) + sc:RegisterEffect(e3,true) + local e4=e1:Clone() + e4:SetCode(EFFECT_CHANGE_LEVEL) + e4:SetValue(8) + sc:RegisterEffect(e4,true) + local e5=e1:Clone() + e5:SetCode(EFFECT_SET_BASE_ATTACK) + e5:SetValue(0) + sc:RegisterEffect(e5,true) + local e6=e1:Clone() + e6:SetCode(EFFECT_SET_BASE_DEFENSE) + e6:SetValue(0) + sc:RegisterEffect(e6,true) + local e7=e1:Clone() + e7:SetCode(EFFECT_CHANGE_CODE) + e7:SetValue(id) + sc:RegisterEffect(e7,true) + end + Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEDOWN_DEFENSE) + Duel.ConfirmCards(1-tp,sg) + if mc:IsHasEffect(EFFECT_LIGHT_OF_INTERVENTION) then + Duel.ChangePosition(mc,POS_FACEUP_DEFENSE) + else + Duel.ChangePosition(mc,POS_FACEDOWN_DEFENSE) + mc:ClearEffectRelation() + end + sg:AddCard(mc) + Duel.ShuffleSetCard(sg) + --Your opponent's activated effect becomes "Destroy 1 face-down Defense Position monster your opponent controls" + Duel.BreakEffect() + local tg=Group.CreateGroup() + Duel.ChangeTargetCard(ev,tg) + Duel.ChangeChainOperation(ev,s.repop) +end +function s.repop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c23856331.lua b/official/c23856331.lua new file mode 100644 index 0000000000..0ce96e4a78 --- /dev/null +++ b/official/c23856331.lua @@ -0,0 +1,82 @@ +--劫火の三幻魔-神炎皇ウリア +--Uria, Lord of Searing Flames - Sacred Beast of Cataclysmic Fire +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Must be Special Summoned with a "Sacred Beast" card + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_CONDITION) + e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end) + c:RegisterEffect(e0) + --You can reveal this card in your hand; add 1 "Sacred Beast" Trap 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) + --Gains 1000 ATK/DEF for each Trap in the GYs + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_SINGLE) + e2a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2a:SetCode(EFFECT_UPDATE_ATTACK) + e2a:SetRange(LOCATION_MZONE) + e2a:SetValue(function(e,c) return 1000*Duel.GetMatchingGroupCount(Card.IsTrap,0,LOCATION_GRAVE,LOCATION_GRAVE,nil) end) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e2b) + --Once per turn (Quick Effect): You can target 1 Spell/Trap on the field; destroy it. Neither player can activate cards or effects in response to this effect's activation + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + 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_series={SET_SACRED_BEAST} +function s.thfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsTrap() 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 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.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 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetChainLimit(aux.FALSE) +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/c24088928.lua b/official/c24088928.lua new file mode 100644 index 0000000000..1e037454af --- /dev/null +++ b/official/c24088928.lua @@ -0,0 +1,88 @@ +--混沌の魔王-スカル・デーモン +--Skull Archfiend of Chaos +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is in your hand or GY: You can target 3 other cards in the GYs and/or face-up banishment, including a card that mentions "Ritual of Light and Darkness"; place them on the bottom of the Deck in any order, and if you do, Special Summon this card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.tdsptg) + e1:SetOperation(s.tdspop) + c:RegisterEffect(e1) + --If this card is sent to the GY: You can send 1 Ritual Spell from your hand or Deck to the GY; add 1 Ritual Monster mentioned on that card 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_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.thcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_LIGHT_AND_DARKNESS_RITUAL} +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.ListsCode,1,nil,CARD_LIGHT_AND_DARKNESS_RITUAL) +end +function s.tdsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local c=e:GetHandler() + local g=Duel.GetTargetGroup(aux.FaceupFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,c) + if chk==0 then return #g>=3 and aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + local tg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TODECK) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,3,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.tdspop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and tg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK|LOCATION_EXTRA) then + local tg_your,tg_opp=tg:Split(Card.IsControler,nil,tp) + local your_count=tg_your:FilterCount(Card.IsLocation,nil,LOCATION_DECK) + local opp_count=tg_opp:FilterCount(Card.IsLocation,nil,LOCATION_DECK) + if your_count>=2 then + Duel.SortDeckbottom(tp,tp,your_count) + end + if opp_count>=2 then + Duel.SortDeckbottom(tp,1-tp,opp_count) + end + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + end +end +function s.thcostfilter(c,tp) + return c:IsRitualSpell() and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c) +end +function s.thfilter(c,rit_spell) + return c:IsRitualMonster() and rit_spell:ListsCode(c:GetCode())and c:IsAbleToHand() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp):GetFirst() + Duel.SendtoGrave(sc,REASON_COST) + e:SetLabelObject(sc) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true 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,e:GetLabelObject()) + 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/c24461358.lua b/official/c24461358.lua new file mode 100644 index 0000000000..45d5d58932 --- /dev/null +++ b/official/c24461358.lua @@ -0,0 +1,75 @@ +--朽ちた祭儀要録 +--Corrupted Ritual Records +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Reveal 1 Ritual Spell in your hand or Deck, and add 1 monster that mentions it 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_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --If a face-up Ritual Monster(s) you control leaves the field by card effect while this card is in your GY, and you control no face-up non-Ritual Monsters: You can add this card to your 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_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_LEAVE_FIELD) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.selfthcon) + e2:SetTarget(s.selfthtg) + e2:SetOperation(s.selfthop) + c:RegisterEffect(e2) +end +function s.revealfilter(c,tp) + return c:IsRitualSpell() and not c:IsPublic() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) +end +function s.thfilter(c,code) + return c:IsMonster() and c:ListsCode(code) and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.rescon(sg,e,tp,mg) + local ritual_spell=sg:Filter(Card.IsRitualSpell,nil):GetFirst() + return ritual_spell and sg:IsExists(s.thfilter,1,nil,ritual_spell:GetCode()),not ritual_spell +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.revealfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,tp) + if #g==0 then return end + g:Merge(Duel.GetMatchingGroup(aux.AND(Card.IsMonster,Card.IsAbleToHand),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 + local opp=1-tp + local ritual_spell,monster=sg:Split(Card.IsRitualSpell,nil) + Duel.ConfirmCards(opp,ritual_spell) + Duel.SendtoHand(monster,nil,REASON_EFFECT) + Duel.ConfirmCards(opp,monster) + end +end +function s.selfthconfilter(c,tp) + return c:IsRitualMonster() and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) + and c:IsReason(REASON_EFFECT) +end +function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.selfthconfilter,1,nil,tp) +end +function s.selfthtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToHand() + and not Duel.IsExistingMatchingCard(aux.FaceupFilter(aux.NOT(Card.IsRitualMonster)),tp,LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) +end +function s.selfthop(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/c24749710.lua b/official/c24749710.lua new file mode 100644 index 0000000000..c1d198869a --- /dev/null +++ b/official/c24749710.lua @@ -0,0 +1,92 @@ +--二つの心 +--Mind Shuffle +--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 either player's turn: You can add 1 monster that mentions "Ritual of Light and Darkness" 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_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.AND(s.opccost1,Cost.HintSelectedEffect)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --When your opponent activates a card or effect: You can return 1 Level 7 or higher monster you control to the hand; Special Summon 1 monster with a different name from your hand that mentions "Ritual of Light and Darkness", ignoring its Summoning conditions + 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_SZONE) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) + e2:SetCost(Cost.AND(s.spcost,s.opccost2,Cost.HintSelectedEffect)) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_LIGHT_AND_DARKNESS_RITUAL} +function s.opccost1(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end + Duel.RegisterFlagEffect(tp,id+1,RESET_CHAIN,0,1) +end +function s.opccost2(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id+1) end + Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1) +end +function s.thfilter(c) + return c:IsMonster() and c:ListsCode(CARD_LIGHT_AND_DARKNESS_RITUAL) 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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) + end +end +function s.spcostfilter(c,e,tp) + return c:IsLevelAbove(7) and c:IsFaceup() and c:IsAbleToHandAsCost() and Duel.GetMZoneCount(tp,c)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetCode()) +end +function s.spfilter(c,e,tp,code) + return c:IsMonster() and c:ListsCode(CARD_LIGHT_AND_DARKNESS_RITUAL) and not c:IsCode(code) + and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +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,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local sc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() + Duel.HintSelection(sc) + Duel.SendtoHand(sc,nil,REASON_COST) + e:SetLabel(sc:GetCode()) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetParam(e:GetLabel()) + 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 + local code=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,code) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) + end +end diff --git a/official/c25687946.lua b/official/c25687946.lua new file mode 100644 index 0000000000..28ed8158bd --- /dev/null +++ b/official/c25687946.lua @@ -0,0 +1,107 @@ +--メルフィーがころんだ +--Melffy Statues Game +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Add up to 4 "Melffy" monsters with different names from your Deck to your hand, then it becomes the End Phase of this turn + 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:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --You cannot Special Summon the turn you activate this card, except "Melffy" monsters + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsSetCard(SET_MELFFY) and c:IsFaceup() end) + --You can banish this card from your GY, then target 2 "Melffy" cards in your GY, except "Melffy Statues Game"; add 1 of them to your hand, and if you do, place the other on the bottom of the Deck. You can only use this effect of "Melffy Statues Game" once per turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thdtg) + e2:SetOperation(s.thdop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MELFFY} +s.listed_names={id} +function s.cost(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 card, except "Melffy" 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 not c:IsSetCard(SET_MELFFY) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thfilter(c) + return c:IsSetCard(SET_MELFFY) and c:IsMonster() 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) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if #g==0 then return end + local thg=aux.SelectUnselectGroup(g,e,tp,1,4,aux.dncheck,1,tp,HINTMSG_ATOHAND) + if #thg>0 and Duel.SendtoHand(thg,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,thg) + local turn_player=Duel.GetTurnPlayer() + Duel.BreakEffect() + if Duel.IsMainPhase1() then + Duel.SkipPhase(turn_player,PHASE_MAIN1,RESET_PHASE|PHASE_END,1) + --Prevent the player from entering the Battle Phase + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_BP) + e1:SetTargetRange(1,0) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,turn_player) + elseif Duel.IsMainPhase2() then + Duel.SkipPhase(turn_player,PHASE_MAIN2,RESET_PHASE|PHASE_END,1) + end + end +end +function s.thdfilter(c) + return c:IsSetCard(SET_MELFFY) and (c:IsAbleToHand() or c:IsAbleToDeck()) and not c:IsCode(id) +end +function s.rescon(sg,e,tp,mg) + return sg:FilterCount(Card.IsAbleToHand,nil)>=1 and sg:FilterCount(Card.IsAbleToDeck,nil)>=1 +end +function s.thdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetTargetGroup(s.thdfilter,tp,LOCATION_GRAVE,0,nil) + if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end + local tg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,aux.Stringid(id,3)) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,1,tp,0) +end +function s.gythfilter(c,tg) + return c:IsAbleToHand() and tg:IsExists(Card.IsAbleToDeck,1,c) +end +function s.thdop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local hg=tg:FilterSelect(tp,s.gythfilter,1,1,nil,tg) + if #hg==0 then return end + Duel.HintSelection(hg) + if Duel.SendtoHand(hg,nil,REASON_EFFECT)==0 then return end + local dg=tg-hg + if #dg==0 then return end + Duel.HintSelection(dg) + Duel.SendtoDeck(dg,nil,SEQ_DECKBOTTOM,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c30109445.lua b/official/c30109445.lua new file mode 100644 index 0000000000..09550a8987 --- /dev/null +++ b/official/c30109445.lua @@ -0,0 +1,74 @@ +--道化の一座 ドリッシュ +--Clown Crew Drish +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 Ritual, Fusion, Synchro, Xyz, and/or Pendulum Monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_RITUAL|TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ|TYPE_PENDULUM),2) + --Your Tribute Summoned monsters can make a second attack during each Battle Phase + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_EXTRA_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsTributeSummoned)) + e1:SetValue(1) + 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 Drish" 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 +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.IsLinkMonster,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.IsPlayerCanDraw(tp) + and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil)) + or (Duel.IsPlayerCanDraw(1-tp) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND,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_TODECK|CATEGORY_DRAW) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Return all Link Monsters on the field and in the GYs to the Extra Deck + local g=Duel.GetMatchingGroup(aux.AND(Card.IsLinkMonster,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 + --● Each player shuffles their entire hand into the Deck, then they draw the same number of cards they shuffled + local turn_player=Duel.GetTurnPlayer() + local step=turn_player==0 and 1 or -1 + for p=turn_player,1-turn_player,step do + local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) + if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and Duel.IsPlayerCanDraw(p) then + local draw_count=Duel.GetOperatedGroup():FilterCount(Card.IsPreviousControler,nil,p) + if draw_count>0 then + Duel.ShuffleDeck(p) + Duel.BreakEffect() + Duel.Draw(p,draw_count,REASON_EFFECT) + end + end + end + end +end diff --git a/official/c31822037.lua b/official/c31822037.lua new file mode 100644 index 0000000000..71fa7187d1 --- /dev/null +++ b/official/c31822037.lua @@ -0,0 +1,77 @@ +--無垢なる祈りの獄神使 +--Power Patron Envoy of Pure Prayers +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 non-Link Monsters + Link.AddProcedure(c,s.matfilter,2) + --If this card is Link Summoned and you have a "Power Patron" monster in your GY: You can add 1 "Theorealize" card 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) + --During the Main Phase, if you control another DARK Fairy monster, you can (Quick Effect): Immediately after this effect resolves, Link Summon using materials you control, including this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.linkcon) + e2:SetTarget(s.linktg) + e2:SetOperation(s.linkop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +s.listed_series={SET_POWER_PATRON,SET_THEOREALIZE} +function s.matfilter(c,lc,sumtyp,sumpl) + return not c:IsType(TYPE_LINK,lc,sumtyp,sumpl) +end +function s.thconfilter(c) + return c:IsSetCard(SET_POWER_PATRON) and c:IsMonster() +end +function s.thfilter(c) + return c:IsSetCard(SET_THEOREALIZE) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thconfilter,tp,LOCATION_GRAVE,0,1,nil) + and 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.linkconfilter(c) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FAIRY) and c:IsFaceup() +end +function s.linkcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.linkconfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) +end +function s.linktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.linkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) or c:IsControler(1-tp) then return end + local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,c) + if #g>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,1,1,nil) + Duel.LinkSummon(tp,sg:GetFirst(),c) + end +end \ No newline at end of file diff --git a/official/c32044675.lua b/official/c32044675.lua new file mode 100644 index 0000000000..cd95aa8e42 --- /dev/null +++ b/official/c32044675.lua @@ -0,0 +1,74 @@ +--無現壊収 ヌルゲイナー +--Glitch Clutch Nullgainer +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 Synchro Summoned: You can add 1 Level 8 or higher monster with 0 ATK 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) + --You can target 1 monster with 0 ATK in your GY; Special Summon it, but negate its effects, also it cannot be used as material for a Fusion, Synchro, Xyz, or Link Summon + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +function s.thfilter(c) + return c:IsLevelAbove(8) and c:IsAttack(0) 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) + return c:IsAttack(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + local c=e:GetHandler() + --Negate its effects, also it cannot be used as material for a Fusion, Synchro, Xyz, or Link Summon + tc:NegateEffects(c) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+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(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/official/c33166263.lua b/official/c33166263.lua new file mode 100644 index 0000000000..d7b53a99fd --- /dev/null +++ b/official/c33166263.lua @@ -0,0 +1,88 @@ +--超越召喚獣アイオーン +--Invoked Transcendence Aeon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 2+ Fusion Monsters with different Attributes + Fusion.AddProcMixRep(c,true,true,s.matfilter,2,99) + --If this card is Fusion Summoned: You can banish cards from the field and/or GYs, up to the number of materials used, then if you used 3 or more, you can look at your opponent's Extra Deck, and if you do, banish up to 3 cards from it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + 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() end) + e1:SetTarget(s.bantg) + e1:SetOperation(s.banop) + c:RegisterEffect(e1) + --(Quick Effect): You can declare 1 Attribute; all other monsters currently on the field become that Attribute until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.attrtg) + e2:SetOperation(s.attrop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +function s.matfilter(c,fc,sumtype,tp,sub,mg,sg) + return c:IsType(TYPE_FUSION,fc,sumtype,tp) and + (not sg or sg:FilterCount(aux.TRUE,c)==0 or not sg:IsExists(Card.IsAttribute,1,c,c:GetAttribute(fc,sumtype,tp),fc,sumtype,tp)) +end +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk) + local material_count=e:GetHandler():GetMaterialCount() + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,nil) + if chk==0 then return material_count>0 and #g>0 end + e:SetLabel(material_count) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,PLAYER_EITHER,LOCATION_ONFIELD|LOCATION_GRAVE) + if material_count>=3 then + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,3,1-tp,LOCATION_EXTRA) + end +end +function s.banop(e,tp,eg,ep,ev,re,r,rp) + local material_count=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,material_count,nil) + if #g==0 then return end + Duel.HintSelection(g) + if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 and material_count>=3 then + local extrag=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil) + if #extrag>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.ConfirmCards(tp,extrag) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local sg=extrag:Select(tp,1,3,nil) + if #sg>0 then + Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) + end + Duel.ShuffleExtra(1-tp) + end + end +end +function s.attrtg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) + if chk==0 then return #g>0 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) + e:SetLabel(Duel.AnnounceAnotherAttribute(g,tp)) +end +function s.attrop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + local attr=e:GetLabel() + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,exc) + for tc in g:Iter() do + --All other monsters currently on the field become that Attribute until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) + e1:SetValue(attr) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c33599853.lua b/official/c33599853.lua new file mode 100644 index 0000000000..7648b3f85b --- /dev/null +++ b/official/c33599853.lua @@ -0,0 +1,53 @@ +--光と闇の儀式 +--Ritual of Light and Darkness +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Ritual Summon 1 "Black Chaos the Dark Chaos Magician" or "Black Luster Soldier - Soldier of Light and Darkness" from your hand, by Tributing monsters from your hand or field, and/or banishing monsters from your GY, whose total Levels equal or exceed its Level + Ritual.AddProcGreater{ + handler=c, + filter=function(c) + return c:IsCode(44001993,70405001) + end, + extrafil=function(e,tp) + return Duel.GetMatchingGroup(aux.AND(Card.HasLevel,Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) + end, + extratg=function(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) + end, + desc=aux.Stringid(id,0) + } + --If this card is in your GY: You can add both this card and 1 card that mentions "Ritual of Light and Darkness" from your GY to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={44001993,70405001,CARD_LIGHT_AND_DARKNESS_RITUAL} +--"Magician of Dark Chaos - Black Chaos", "Black Luster Soldier - Soldier of Light and Darkness" +function s.thfilter(c) + return c:ListsCode(CARD_LIGHT_AND_DARKNESS_RITUAL) 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:IsAbleToHand() + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE) +end +function s.thop(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_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,c) + if #g>0 then + g:AddCard(c) + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c36709484.lua b/official/c36709484.lua new file mode 100644 index 0000000000..7a1dc87a96 --- /dev/null +++ b/official/c36709484.lua @@ -0,0 +1,75 @@ +--予幻なき日々のまぼろし +--Pasto-Ral Theorealize +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If you control an "Artmage", "DoomZ", or "Elfnote" card: Special Summon 1 "Medius the Pure" from your hand or Deck, also your opponent cannot activate cards or effects when that monster is Special Summoned + 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) + e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,{SET_ARTMAGE,SET_DOOMZ,SET_ELFNOTE}),tp,LOCATION_ONFIELD,0,1,nil) end) + e1:SetTarget(s.mediussptg) + e1:SetOperation(s.mediusspop) + c:RegisterEffect(e1) + --You can banish this card from your GY, then target 1 Fusion, Synchro, or Xyz Monster in your GY; Special Summon it to your zone a Link Monster points to + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.gysptg) + e2:SetOperation(s.gyspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ARTMAGE,SET_DOOMZ,SET_ELFNOTE} +s.listed_names={CARD_MEDIUS_THE_PURE} +function s.mediusspfilter(c,e,tp) + return c:IsCode(CARD_MEDIUS_THE_PURE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.mediussptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.mediusspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.mediusspop(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.mediusspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then + --Also your opponent cannot activate cards or effects when that monster is Special Summoned + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_END) + e1:SetOperation(function(e) + Duel.SetChainLimitTillChainEnd(function(e,rp,tp) return tp==rp end) + e:Reset() + end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end +function s.gyspfilter(c,e,tp,zones) + return c:IsType(TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zones) +end +function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local zones=aux.GetMMZonesPointedTo(tp) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.gyspfilter(chkc,e,tp,zones) end + if chk==0 then return zones>0 and Duel.IsExistingTarget(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zones) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zones) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.gyspop(e,tp,eg,ep,ev,re,r,rp) + local zones=aux.GetMMZonesPointedTo(tp) + if zones==0 then return end + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zones) + end +end \ No newline at end of file diff --git a/official/c37432075.lua b/official/c37432075.lua new file mode 100644 index 0000000000..46b18e2b09 --- /dev/null +++ b/official/c37432075.lua @@ -0,0 +1,54 @@ +--召喚魔術-「剣」 +--Invocation "Sword" +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters you control. If Summoning an "Invoked" Fusion Monster this way, you can also return banished monsters to the GY as material + local e1=Fusion.CreateSummonEff({ + handler=c, + matfilter=Fusion.OnFieldMat, + extrafil=s.fextra, + }) + e1:SetCountLimit(1,{id,0}) + 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: You can target 1 "Aleister" monster or "Invocation" in your GY; shuffle this card into the Deck, and if you do, add the targeted card to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) +end +s.listed_series={SET_INVOKED,SET_ALEISTER} +s.listed_names={CARD_INVOCATION} +function s.checkmat(tp,sg,fc) + return fc:IsSetCard(SET_INVOKED) or not sg:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) +end +function s.fextra(e,tp,mg) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup),tp,LOCATION_REMOVED,LOCATION_REMOVED,nil),s.checkmat +end +function s.thfilter(c) + return ((c:IsSetCard(SET_ALEISTER) and c:IsMonster()) or c:IsCode(CARD_INVOCATION)) and c:IsAbleToHand() +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end + 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_TODECK,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) + and tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c37654623.lua b/official/c37654623.lua new file mode 100644 index 0000000000..9377b5d4d5 --- /dev/null +++ b/official/c37654623.lua @@ -0,0 +1,89 @@ +--天空城塞クーロン +--Kowloon, Citadel of the Sky +--scripted by pyrQ +local s,id=GetID() +local TOKEN_MECH_BEAST=id+1 +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Monsters you control that were Normal or Special Summoned from the hand gain 500 ATK/DEF + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD) + e1a:SetCode(EFFECT_UPDATE_ATTACK) + e1a:SetRange(LOCATION_FZONE) + e1a:SetTargetRange(LOCATION_MZONE,0) + e1a:SetTarget(function(e,c) return (c:IsNormalSummoned() or c:IsSpecialSummoned()) and c:IsSummonLocation(LOCATION_HAND) end) + e1a:SetValue(500) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e1b) + --During your Main Phase: You can Special Summon 1 "Mech Beast Token" (Machine/EARTH/Level 6/ATK 2000/DEF 2000) to your opponent's field, and if you do, add 1 "Blitzclique" monster from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_FZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetTarget(s.tokentg) + e2:SetOperation(s.tokenop) + c:RegisterEffect(e2) + --If a card(s) is destroyed by your "Blitzclique" card's effect, 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_DESTROYED) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.selfthcon) + e3:SetTarget(s.selfthtg) + e3:SetOperation(s.selfthop) + c:RegisterEffect(e3) +end +s.listed_names={TOKEN_MECH_BEAST} +s.listed_series={SET_BLITZCLIQUE} +function s.thfilter(c) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsMonster() and c:IsAbleToHand() +end +function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECH_BEAST,0,TYPES_TOKEN,2000,2000,6,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP,1-tp) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.tokenop(e,tp,eg,ep,ev,re,r,rp) + local opp=1-tp + if Duel.GetLocationCount(opp,LOCATION_MZONE)<=0 + or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECH_BEAST,0,TYPES_TOKEN,2000,2000,6,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP,opp) then return end + local token=Duel.CreateToken(tp,TOKEN_MECH_BEAST) + if Duel.SpecialSummon(token,0,tp,opp,false,false,POS_FACEUP)>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(opp,g) + end + end +end +function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) + return rp==tp and re and not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) + and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) +end +function s.selfthtg(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.selfthop(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/c38776201.lua b/official/c38776201.lua new file mode 100644 index 0000000000..04e230e8c2 --- /dev/null +++ b/official/c38776201.lua @@ -0,0 +1,66 @@ +--三幻魔解放 +--Unleashing the Sacred Beasts +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Add 3 "Sacred Beast" monsters with different names from your Deck to your hand, then discard 2 cards + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.th3tg) + e1:SetOperation(s.th3op) + c:RegisterEffect(e1) + --If this card is in your GY, except the turn it was sent there: You can banish it; add 1 Level 10 Pyro, Thunder, or Fiend monster that cannot be Normal Summoned/Set 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_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(aux.exccon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.th1tg) + e2:SetOperation(s.th1op) + c:RegisterEffect(e2) +end +s.listed_series={SET_SACRED_BEAST} +function s.th3filter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsMonster() and c:IsAbleToHand() +end +function s.th3tg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.th3filter,tp,LOCATION_DECK,0,nil) + return aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,0) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,3,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2) +end +function s.th3op(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.th3filter,tp,LOCATION_DECK,0,nil) + if #g<3 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_ATOHAND) + if #sg==3 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,sg) + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT|REASON_DISCARD,nil) + end +end +function s.th1filter(c) + return c:IsLevel(10) and c:IsRace(RACE_PYRO|RACE_THUNDER|RACE_FIEND) and not c:IsSummonableCard() + and c:IsAbleToHand() +end +function s.th1tg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.th1filter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.th1op(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.th1filter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/official/c433377.lua b/official/c433377.lua new file mode 100644 index 0000000000..545cd6a18a --- /dev/null +++ b/official/c433377.lua @@ -0,0 +1,101 @@ +--雷盟-ステップリーダ +--Blitzclique - Stepped Leader +--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) + --If a card(s) is destroyed by your "Blitzclique" card's effect: You can target 1 Thunder monster in your GY; add it to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_DESTROYED) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.thcon) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --During your Main Phase: You can Special Summon 1 Thunder monster from your hand, then destroy this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --If a card(s) is destroyed by your "Blitzclique" card's effect, 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,2)) + 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_DESTROYED) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.selfthcon) + e3:SetTarget(s.selfthtg) + e3:SetOperation(s.selfthop) + c:RegisterEffect(e3) +end +s.listed_series={SET_BLITZCLIQUE} +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return rp==tp and re and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) +end +function s.thfilter(c) + return c:IsRace(RACE_THUNDER) 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) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end + 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 +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_THUNDER) 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) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local c=e:GetHandler() + 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 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) then + Duel.BreakEffect() + Duel.Destroy(c,REASON_EFFECT) + end +end +function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) + return rp==tp and re and not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) + and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) +end +function s.selfthtg(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.selfthop(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/c43989315.lua b/official/c43989315.lua new file mode 100644 index 0000000000..6794954088 --- /dev/null +++ b/official/c43989315.lua @@ -0,0 +1,68 @@ +--召喚獣ソラト +--Invoked Sorath +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Aleister" monster + 1 FIRE or WIND monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ALEISTER),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_FIRE|ATTRIBUTE_WIND)) + --During the Main Phase (Quick Effect): You can target 1 Level 6 or lower monster in either GY; Special Summon it to your field in Defense Position, but negate its effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function() return Duel.IsMainPhase() end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e1) + --If this card is in your GY: You can Fusion Summon 1 "Invoked" Fusion Monster from your Extra Deck, by banishing its materials from your field and/or GY, including this card in the GY + local fusion_params={ + fusfilter=function(c) return c:IsSetCard(SET_INVOKED) end, + matfilter=aux.FALSE, + extrafil=function(e,tp,mg) + local locations=not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and (LOCATION_MZONE|LOCATION_GRAVE) or LOCATION_MZONE + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,locations,0,nil) + end, + extraop=Fusion.BanishMaterial, + gc=Fusion.ForcedHandler, + extratg=function(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,tp,LOCATION_MZONE|LOCATION_GRAVE) + end + } + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + c:RegisterEffect(e2) +end +s.listed_series={SET_ALEISTER,SET_INVOKED} +s.material_setcode={SET_ALEISTER} +function s.spfilter(c,e,tp) + return c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,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) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then + --Negate its effects + tc:NegateEffects(e:GetHandler()) + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/official/c44001993.lua b/official/c44001993.lua new file mode 100644 index 0000000000..88767c4c26 --- /dev/null +++ b/official/c44001993.lua @@ -0,0 +1,89 @@ +--黒き混沌の魔術師ブラック・カオス +--Black Chaos the Dark Chaos Magician +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Unaffected by your opponent's activated effects, unless they target this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_IMMUNE_EFFECT) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(s.immval) + c:RegisterEffect(e1) + --Spells/Traps you control cannot be destroyed, or banished, by your opponent's card effects + local e2a=Effect.CreateEffect(c) + e2a:SetType(EFFECT_TYPE_FIELD) + e2a:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e2a:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e2a:SetRange(LOCATION_MZONE) + e2a:SetTargetRange(LOCATION_ONFIELD,0) + e2a:SetTarget(function(e,c) return c:IsSpellTrap() end) + e2a:SetValue(aux.indoval) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2b:SetCode(EFFECT_CANNOT_REMOVE) + e2b:SetTargetRange(0,1) + e2b:SetTarget(function(e,c,tp,r) return c:IsSpellTrap() and c:IsControler(e:GetHandlerPlayer()) and c:IsOnField() and r==REASON_EFFECT end) + e2b:SetValue(1) + c:RegisterEffect(e2b) + --If this card is Special Summoned: You can add 1 Spell from your GY to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,0}) + e3:SetTarget(s.thtg) + e3:SetOperation(s.thop) + c:RegisterEffect(e3) + --You can target 1 card your opponent controls; banish it (face-down) + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_REMOVE) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,{id,1}) + e4:SetTarget(s.bantg) + e4:SetOperation(s.banop) + c:RegisterEffect(e4) +end +s.listed_names={CARD_LIGHT_AND_DARKNESS_RITUAL} +function s.immval(e,re) + if not (re:IsActivated() and e:GetOwnerPlayer()==1-re:GetOwnerPlayer()) then return false end + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end + local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) + return not (tg and tg:IsContains(e:GetHandler())) +end +function s.thfilter(c) + return c:IsSpell() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,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,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToRemove(tp,POS_FACEDOWN) end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil,tp,POS_FACEDOWN) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil,tp,POS_FACEDOWN) + 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_FACEDOWN,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c45223540.lua b/official/c45223540.lua new file mode 100644 index 0000000000..ef7db47f2b --- /dev/null +++ b/official/c45223540.lua @@ -0,0 +1,55 @@ +--沼地の魔道王 +--Magical King of the Swamp +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --If this card is in your hand: You can reveal 1 Fusion Monster in your Extra Deck and banish 1 material whose name is mentioned on it from your Deck, then Special Summon this card, and its name can be treated as the banished monster's if used as Fusion Material this turn. You can only use this effect of "Magical King of the Swamp" once per turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE+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 +function s.revealfilter(c,tp) + return c:IsFusionMonster() and c.material and Duel.IsExistingMatchingCard(s.banfilter,tp,LOCATION_DECK,0,1,nil,c.material) +end +function s.banfilter(c,codes) + return c:IsCode(codes) and c:IsAbleToRemove() +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) + and Duel.IsExistingMatchingCard(s.revealfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local reveal_card=Duel.SelectMatchingCard(tp,s.revealfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp):GetFirst() + if not reveal_card then return end + Duel.ConfirmCards(1-tp,reveal_card) + Duel.ShuffleExtra(tp) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local banish_card=Duel.SelectMatchingCard(tp,s.banfilter,tp,LOCATION_DECK,0,1,1,nil,reveal_card.material):GetFirst() + if banish_card and Duel.Remove(banish_card,POS_FACEUP,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then + Duel.BreakEffect() + if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --Its name can be treated as the banished monster's if used as Fusion Material this turn + 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_ADD_CODE) + e1:SetValue(banish_card:GetOriginalCodeRule()) + e1:SetOperation(function(scard,sumtype,tp) return (sumtype&MATERIAL_FUSION)>0 or (sumtype&SUMMON_TYPE_FUSION)>0 end) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + end + end +end \ No newline at end of file diff --git a/official/c46072770.lua b/official/c46072770.lua new file mode 100644 index 0000000000..45c791b1ba --- /dev/null +++ b/official/c46072770.lua @@ -0,0 +1,93 @@ +--幻影騎士団ディケイクローク +--The Phantom Knights of Decayed Cloak +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --You can reveal 1 other "The Phantom Knights" card in your hand; 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:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and not c:IsPublic() end,true)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If this card is Normal or Special Summoned: You can add 1 "The Phantom Knights" monster 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) + --You can banish this card from your GY, then target 1 Xyz Monster you control; this turn, you can use it as material for an Xyz Summon using its Rank as if it were a Level + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.xyztg) + e3:SetOperation(s.xyzop) + c:RegisterEffect(e3) +end +s.listed_series={SET_THE_PHANTOM_KNIGHTS} +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_THE_PHANTOM_KNIGHTS) 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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + end +end +function s.xyzfilter(c) + return c:IsXyzMonster() and c:IsFaceup() and not c:HasFlagEffect(id) +end +function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.xyzfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.xyzop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + --This turn, you can use it as material for an Xyz Summon using its Rank as if it were a Level + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_XYZ_LEVEL) + e1:SetValue(function(e,c,rc) return c:GetRank() end) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c4611341.lua b/official/c4611341.lua new file mode 100644 index 0000000000..0326e41a09 --- /dev/null +++ b/official/c4611341.lua @@ -0,0 +1,71 @@ +--S-Force ミスティファイ +--S-Force Mystify +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ monsters, including an "S-Force" monster + Link.AddProcedure(c,nil,2,3,s.lcheck) + --While an opponent's monster is in this card's column, your opponent cannot target this card with card effects, also they cannot Special Summon with activated monster effects + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_SINGLE) + e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1a:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e1a:SetRange(LOCATION_MZONE) + e1a:SetCondition(s.columncon) + e1a:SetValue(aux.tgoval) + c:RegisterEffect(e1a) + local e1b=Effect.CreateEffect(c) + e1b:SetType(EFFECT_TYPE_FIELD) + e1b:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1b:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1b:SetRange(LOCATION_MZONE) + e1b:SetTargetRange(0,1) + e1b:SetCondition(s.columncon) + e1b:SetTarget(function(e,c,sump,sumtype,sumpos,targetp,se) return se and se:IsActivated() and se:IsMonsterEffect() end) + c:RegisterEffect(e1b) + --(Quick Effect): You can target 1 monster on the field; move it to another of its controller's Main Monster Zones + 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:SetCountLimit(1,id) + e2:SetTarget(s.mvtg) + e2:SetOperation(s.mvop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_S_FORCE} +s.material_setcode={SET_S_FORCE} +function s.lcheck(g,lc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_S_FORCE,lc,sumtype,tp) +end +function s.columnfilter(c,opp) + return c:IsLocation(LOCATION_MZONE) and c:IsControler(opp) +end +function s.columncon(e) + return e:GetHandler():GetColumnGroup():IsExists(s.columnfilter,1,nil,1-e:GetHandlerPlayer()) +end +function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local own_loc=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and LOCATION_MZONE or 0 + local opp_loc=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and LOCATION_MZONE or 0 + if chkc then return chkc:IsLocation(LOCATION_MZONE) and (chkc:IsControler(tp) and (own_loc>0) or (opp_loc>0)) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,own_loc,opp_loc,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) + Duel.SelectTarget(tp,nil,tp,own_loc,opp_loc,1,1,nil) +end +function s.mvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end + local player=tc:GetControler() + if Duel.GetLocationCount(player,LOCATION_MZONE)>0 then + local is_own=player==tp + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) + local zone=Duel.SelectDisableField(tp,1,is_own and LOCATION_MZONE or 0,is_own and 0 or LOCATION_MZONE,0) + if not is_own then zone=zone>>16 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) + Duel.MoveSequence(tc,math.log(zone,2)) + end +end \ No newline at end of file diff --git a/official/c46955132.lua b/official/c46955132.lua new file mode 100644 index 0000000000..86b41a3439 --- /dev/null +++ b/official/c46955132.lua @@ -0,0 +1,90 @@ +--メルフィー・ラビィーズ +--Melffy Rabbys +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If your opponent Normal or Special Summons a monster(s): You can Special Summon this card from your hand, then you can Fusion Summon 1 "Melffy" Fusion Monster from your Extra Deck, using monsters from your hand or field + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + e1a:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e1a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1a:SetProperty(EFFECT_FLAG_DELAY) + e1a:SetCode(EVENT_SUMMON_SUCCESS) + e1a:SetRange(LOCATION_HAND) + e1a:SetCountLimit(1,id) + e1a:SetCondition(s.spcon) + e1a:SetTarget(s.sptg) + e1a:SetOperation(s.spop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --If this card is Normal or Special Summoned: You can add 1 "Melffy" monster from your Deck to your hand, then if you added a Normal Monster, you can Special Summon any number of Beast monsters from your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+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) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) +end +s.listed_series={SET_MELFFY} +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(Card.IsSummonPlayer,1,nil,1-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_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_FUSION_SUMMON,nil,1,tp,LOCATION_EXTRA) +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 fusion_params={handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_MELFFY)} + if Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp,1) + end + end +end +function s.thfilter(c) + return c:IsSetCard(SET_MELFFY) 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) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +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) + if not sc:IsType(TYPE_NORMAL) then return end + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft<=0 then return end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) + if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end + ft=math.min(#g,ft) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,1,ft,nil) + 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/official/c47914440.lua b/official/c47914440.lua new file mode 100644 index 0000000000..22aea6b5e6 --- /dev/null +++ b/official/c47914440.lua @@ -0,0 +1,57 @@ +--レーン・リストリクション +--Lane Restriction +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can Special Summon 1 of your banished monsters to your rightmost Main Monster Zone + 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:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --If your opponent would Normal or Special Summon a monster(s) to their Main Monster Zone, they must use the leftmost unused zone(s) + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EFFECT_FORCE_MZONE) + e2:SetRange(LOCATION_SZONE) + e2:SetTargetRange(0,1) + e2:SetValue(s.forcemzoneval) + c:RegisterEffect(e2) +end +local offset=Duel.IsDuelType(DUEL_3_COLUMNS_FIELD) and 1 or 0 +local LEFTMOST_SEQ=0+offset +local RIGHTMOST_SEQ=4-offset +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) +end +function s.spfilter(c,e,tp,rightmost_zone) + return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,rightmost_zone) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local rightmost_zone=1<0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP,rightmost_zone) + end + end +end +function s.forcemzoneval(e,fp,rp,r) + --Needs to somehow not affect Normal Sets, no way to do that atm + local opp=1-e:GetHandlerPlayer() + for seq=LEFTMOST_SEQ,RIGHTMOST_SEQ do + if Duel.CheckLocation(opp,LOCATION_MZONE,seq) then + return (1<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,true,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c50147815.lua b/official/c50147815.lua new file mode 100644 index 0000000000..fcd27423ce --- /dev/null +++ b/official/c50147815.lua @@ -0,0 +1,69 @@ +--三幻魔合殺 +--Destruction Chant of the Sacred Beast +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "Sacred Beast" monster from your hand or GY in Defense Position, then if you control 2 or more "Sacred Beast" monsters whose original Levels are 10, you can negate the effects of 1 face-up card your opponent controls, and if you do, destroy it + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_DESTROY) + 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) + --You can banish this card from your GY; Fusion Summon 1 "Phantasm" Fusion Monster from your Extra Deck, using monsters from your hand or field + local fusion_params={fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_PHANTASM)} + 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_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(Fusion.SummonEffTG(fusion_params)) + e2:SetOperation(Fusion.SummonEffOP(fusion_params)) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_SACRED_BEAST,SET_PHANTASM} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP_DEFENSE) +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) + local dg=Duel.GetMatchingGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil) + Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,dg,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,0) +end +function s.sacredbeastfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsOriginalLevel(10) and c:IsFaceup() +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 and Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP_DEFENSE)>0 + and Duel.IsExistingMatchingCard(s.sacredbeastfilter,tp,LOCATION_MZONE,0,2,nil) + and Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local sc=Duel.SelectMatchingCard(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + if sc:IsCanBeDisabledByEffect(e) then + Duel.BreakEffect() + --Negate the effects of 1 face-up card your opponent controls, and if you do, destroy it + sc:NegateEffects(e:GetHandler(),RESET_EVENT|RESETS_STANDARD,true) + Duel.AdjustInstantly(sc) + if sc:IsDisabled() then + Duel.Destroy(sc,REASON_EFFECT) + end + end + end +end diff --git a/official/c50251045.lua b/official/c50251045.lua new file mode 100644 index 0000000000..69c9fb59e4 --- /dev/null +++ b/official/c50251045.lua @@ -0,0 +1,104 @@ +--罪禍の三幻魔-降雷皇ハモン +--Hamon, Lord of Striking Thunder - Sacred Beast of Sinful Catastrophe +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Must be Special Summoned with a "Sacred Beast" card + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_CONDITION) + e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end) + c:RegisterEffect(e0) + --You can reveal this card in your hand; add 1 "Sacred Beast" Spell 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) + --Once per turn, if a monster(s) is sent to your opponent's GY: Inflict 1000 damage to your opponent + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCondition(s.damcon) + e2:SetTarget(s.damtg) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) + --If this card is destroyed by battle or card effect: You can activate this effect; you take no damage this turn + 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_DESTROYED) + e3:SetCondition(s.nodamcon) + e3:SetTarget(s.nodamtg) + e3:SetOperation(s.nodamop) + c:RegisterEffect(e3) +end +s.listed_series={SET_SACRED_BEAST} +function s.thfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsSpell() 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 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.damconfilter(c,opp) + return c:IsMonster() and c:IsControler(opp) +end +function s.damcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.damconfilter,1,nil,1-tp) +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetParam(1000) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,1,tp,1-tp,1000) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + Duel.Damage(1-tp,d,REASON_EFFECT) +end +function s.nodamcon(e,tp,eg,ep,ev,re,r,rp) + return (r&(REASON_EFFECT|REASON_BATTLE))>0 +end +function s.nodamtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end +end +function s.nodamop(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --You take no damage this turn + 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_CHANGE_DAMAGE) + e1:SetTargetRange(1,0) + e1:SetValue(0) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local e2=e1:Clone() + e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) + Duel.RegisterEffect(e2,tp) +end \ No newline at end of file diff --git a/official/c51869363.lua b/official/c51869363.lua new file mode 100644 index 0000000000..46fcb7ede2 --- /dev/null +++ b/official/c51869363.lua @@ -0,0 +1,92 @@ +--超電導閃輝プラズマ・ブラスト +--Plasma Blast +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Activate this effect depending on whose turn it is; + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --Keep track of a monster being destroyed by battle or card effect + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_DESTROYED) + ge1:SetOperation(s.descheckop) + Duel.RegisterEffect(ge1,0) + end) +end +function s.descheckfilter(c) + return (c:IsPreviousLocation(LOCATION_MZONE) or (not c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsMonsterCard())) + and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end +function s.descheckop(e,tp,eg,ep,ev,re,r,rp) + if eg:IsExists(s.descheckfilter,1,nil) then + Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) + end +end +function s.thfilter(c) + return c:IsRace(RACE_THUNDER|RACE_ROCK) and c:IsAbleToHand() and (c:IsFaceup() or c:IsLocation(LOCATION_DECK)) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local op=Duel.IsTurnPlayer(tp) and 1 or 2 + local locations=LOCATION_MZONE|LOCATION_GRAVE|LOCATION_REMOVED + if Duel.HasFlagEffect(0,id) then locations=locations|LOCATION_DECK end + if chk==0 then + if op==1 then + return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 + and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_DECK,0,1,nil,RACE_THUNDER|RACE_ROCK) + elseif op==2 then + return Duel.IsExistingMatchingCard(s.thfilter,tp,locations,0,1,nil) + end + end + e:SetLabel(op) + Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,op)) + if op==1 then + e:SetCategory(CATEGORY_DESTROY) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) + elseif op==2 then + e:SetCategory(CATEGORY_TOHAND|CATEGORY_SEARCH) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,locations) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Yours: Place 1 Thunder or Rock monster from your Deck on top of your Deck, then if a Thunder or Rock monster is in your field or GY, you can destroy 1 card on the field + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) + local sc=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_DECK,0,1,1,nil,RACE_THUNDER|RACE_ROCK):GetFirst() + if not sc then return end + Duel.ShuffleDeck(tp) + Duel.MoveSequence(sc,0) + Duel.ConfirmDecktop(tp,1) + local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)-e:GetHandler() + if #g>0 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_THUNDER|RACE_ROCK),tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=g:Select(tp,1,1,nil) + if #dg>0 then + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end + elseif op==2 then + --● Opponent's: Add 1 Thunder or Rock monster from your field, GY, or banishment to the hand, or if a monster(s) was destroyed by battle or card effect this turn, you can add from your Deck instead + local locations=LOCATION_MZONE|LOCATION_GRAVE|LOCATION_REMOVED + if Duel.HasFlagEffect(0,id) then locations=locations|LOCATION_DECK end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local hc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,locations,0,1,1,nil):GetFirst() + if hc then + if not hc:IsLocation(LOCATION_DECK) then Duel.HintSelection(hc) end + Duel.SendtoHand(hc,nil,REASON_EFFECT) + if hc:IsPreviousLocation(LOCATION_DECK) then Duel.ConfirmCards(1-tp,hc) end + end + end +end \ No newline at end of file diff --git a/official/c5559570.lua b/official/c5559570.lua new file mode 100644 index 0000000000..21d783c286 --- /dev/null +++ b/official/c5559570.lua @@ -0,0 +1,57 @@ +--誇り高き耀聖の詩-エルフェンノーツ +--June Pride - Elfnotes +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1 Spellcaster non-Tuner + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(Card.IsRace,RACE_SPELLCASTER),1,1) + --While this card is in the center Main Monster Zone, neither player can declare attacks, except with monsters in the center Main Monster Zones + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetCondition(function(e) return e:GetHandler():IsSequence(2) end) + e1:SetTarget(function(e,c) return not c:IsSequence(2) end) + c:RegisterEffect(e1) + --During the Main Phase, if this card is in the center Main Monster Zone (Quick Effect): You can return it to the Extra Deck, and if you do, Special Summon up to 1 "Elfnote" monster each from your hand, Deck, and GY. You can only use this effect of "June Pride - Elfnotes" once per turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e) return Duel.IsMainPhase() and e:GetHandler():IsSequence(2) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) +end +s.listed_series={SET_ELFNOTE} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ELFNOTE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToExtra() and Duel.GetMZoneCount(tp,c)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_EXTRA) then + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) + ft=math.min(ft,#g,3) + if ft<=0 then return end + 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.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/official/c57294268.lua b/official/c57294268.lua new file mode 100644 index 0000000000..d2f5451a5e --- /dev/null +++ b/official/c57294268.lua @@ -0,0 +1,91 @@ +--追憶のアレイスター +--Aleister the Reminiscent +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card is in your hand: You can target 1 Spellcaster monster or 1 Fusion Monster on the field; Special Summon this card, and if you do, the targeted monster gains 1000 ATK until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) + 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) + --If this card is Normal or Special Summoned, or flipped face-up: You can banish 1 "Invoked" monster from your Extra Deck; add 1 "Invocation", or 1 Spell that mentions it, 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:SetCost(s.thcost) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + local e2c=e2a:Clone() + e2c:SetCode(EVENT_FLIP) + c:RegisterEffect(e2c) +end +s.listed_names={CARD_INVOCATION} +s.listed_series={SET_INVOKED} +function s.atkfilter(c) + return (c:IsRace(RACE_SPELLCASTER) or c:IsFusionMonster()) and c:IsFaceup() +end +function s.sptg(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) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local tc=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,tc,1,tp,1000) +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) and tc:IsFaceup() then + --The targeted monster gains 1000 ATK until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(1000) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end + end +end +function s.thcostfilter(c) + return c:IsSetCard(SET_INVOKED) and c:IsMonster() and c:IsAbleToRemoveAsCost() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_EXTRA,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.thfilter(c) + return (c:IsCode(CARD_INVOCATION) or (c:IsSpell() and c:ListsCode(CARD_INVOCATION))) 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 tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if tc then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,tc) + end +end \ No newline at end of file diff --git a/official/c58036097.lua b/official/c58036097.lua new file mode 100644 index 0000000000..2d59e5d1c0 --- /dev/null +++ b/official/c58036097.lua @@ -0,0 +1,73 @@ +--どきどきメルフィータイム +--Exciting Melffy Time +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Target 1 "Melffy" monster in your field or GY; return it to the hand, then you can Fusion Summon 1 Beast Fusion Monster from your Extra Deck, using monsters from your hand or field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + 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) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --If you control a "Melffy" Xyz Monster: You can banish this card from your GY; "Melffy" monsters you control that were Special Summoned from the Extra Deck are unaffected by your opponent's activated effects this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.immcon) + e2:SetCost(Cost.SelfBanish) + e2:SetOperation(s.immop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE) + c:RegisterEffect(e2) +end +s.listed_series={SET_MELFFY} +function s.rthfilter(c) + return c:IsSetCard(SET_MELFFY) and c:IsMonster() and c:IsFaceup() and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.rthfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rthfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,s.rthfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_FUSION_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then + Duel.ShuffleHand(tc:GetControler()) + local fusion_params={handler=c,fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_BEAST)} + if Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp) + end + end +end +function s.immconfilter(c) + return c:IsSetCard(SET_MELFFY) and c:IsXyzMonster() and c:IsFaceup() +end +function s.immcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.immconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.immop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3)) + --"Melffy" monsters you control that were Special Summoned from the Extra Deck are unaffected by your opponent's activated effects this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_IMMUNE_EFFECT) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_MELFFY) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() end) + e1:SetValue(function(e,re) return re:GetHandlerPlayer()==1-e:GetHandlerPlayer() and re:IsActivated() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c5833929.lua b/official/c5833929.lua new file mode 100644 index 0000000000..57b91ba9f3 --- /dev/null +++ b/official/c5833929.lua @@ -0,0 +1,76 @@ +--メルフィーゴッド・マミィ +--Melffy God Mommy +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 3+ Level 2 Beast monsters, OR 1 "Melffy Mommy" you control + Xyz.AddProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_BEAST),2,3,s.altxyzmatfilter,aux.Stringid(id,0),Xyz.InfiniteMats,s.altxyzop) + --If this card is Special Summoned: You can add 1 "Melffy" Spell/Trap from your Deck or GY to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + 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:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Gains ATK equal to the combined ATK and DEF of all "Melffy" monsters attached to it + 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) + --You can detach 5 materials from this card; return all cards your opponent controls to the hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCost(Cost.DetachFromSelf(5)) + e3:SetTarget(s.rthtg) + e3:SetOperation(s.rthop) + c:RegisterEffect(e3) +end +s.listed_names={76833149} --"Melffy Mommy" +s.listed_series={SET_MELFFY} +function s.altxyzmatfilter(c,tp,xyzc) + return c:IsFaceup() and c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,76833149) +end +function s.altxyzop(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_MELFFY) 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|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.atkval(e,c) + local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsSetCard,nil,SET_MELFFY) + return g:GetSum(Card.GetAttack)+g:GetSum(Card.GetDefense) +end +function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end + local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0) +end +function s.rthop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c58809685.lua b/official/c58809685.lua new file mode 100644 index 0000000000..173421f18a --- /dev/null +++ b/official/c58809685.lua @@ -0,0 +1,91 @@ +--エルフェンノーツ~継唱のクウォートレイン~ +--Elfnotes: Quatrain of Succession +--scripted by pyrQ +local s,id=GetID() +local TOKEN_ELFNOTE_SERAPHIM=id+1 +function s.initial_effect(c) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --The monster in your center Main Monster Zone cannot be banished by your opponent's card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_REMOVE) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(0,1) + e1:SetTarget(s.rmlimit) + c:RegisterEffect(e1) + --You can send 1 other Spell/Trap from your hand or field to the GY and declare a Level from 1 to 4; Special Summon 1 "Elfnote Seraphim Token" (Plant/Tuner/FIRE/ATK 0/DEF 0) with the declared Level, but while that Token is in the Monster Zone, the player who Summoned it cannot Special Summon from the Extra Deck, except "Elfnote" monsters. You can only use this effect of "Elfnotes: Quatrain of Succession" once per turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,id) + e2:SetCost(s.tokencost) + e2:SetTarget(s.tokentg) + e2:SetOperation(s.tokenop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_names={TOKEN_ELFNOTE_SERAPHIM} +s.listed_series={SET_ELFNOTE} +function s.rmlimit(e,c,tp,r) + return c:IsSequence(2) and c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) and not c:IsImmuneToEffect(e) and r&REASON_EFFECT>0 +end +function s.tokencostfilter(c,tp) + return c:IsSpellTrap() and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 +end +function s.tokencost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.tokencostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,c,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tokencostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c,tp) + Duel.SendtoGrave(g,REASON_COST) +end +function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) + local exceptions={} + for lv=1,4 do + if not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ELFNOTE_SERAPHIM,SET_ELFNOTE,TYPES_TOKEN|TYPE_TUNER,0,0,lv,RACE_PLANT,ATTRIBUTE_FIRE) then + table.insert(exceptions,lv) + end + end + if chk==0 then return #exceptions<4 end + local declared_lv=Duel.AnnounceLevel(tp,1,4,exceptions) + e:SetLabel(declared_lv) + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) +end +function s.tokenop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local lv=e:GetLabel() + if Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ELFNOTE_SERAPHIM,SET_ELFNOTE,TYPES_TOKEN|TYPE_TUNER,0,0,lv,RACE_PLANT,ATTRIBUTE_FIRE) then + local c=e:GetHandler() + local token=Duel.CreateToken(tp,TOKEN_ELFNOTE_SERAPHIM) + --Set the Token's Level to the declared Level + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)) + token:RegisterEffect(e1) + if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then + --While that Token is in the Monster Zone, the player who Summoned it cannot Special Summon from the Extra Deck, except "Elfnote" monsters + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e2:SetRange(LOCATION_MZONE) + e2:SetAbsoluteRange(tp,1,0) + e2:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_ELFNOTE) end) + e2:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)) + token:RegisterEffect(e2) + end + Duel.SpecialSummonComplete() + end +end \ No newline at end of file diff --git a/official/c58916810.lua b/official/c58916810.lua new file mode 100644 index 0000000000..ad598c3a0a --- /dev/null +++ b/official/c58916810.lua @@ -0,0 +1,80 @@ +--クラック・ブリッツクリーク +--Crack Blitzclique +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --When your opponent activates a monster effect on the field during their turn (Quick Effect): You can reveal this card in your hand; destroy that monster, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(s.descon) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can send 1 "Blitzclique" Spell/Trap from your Deck to the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) +end +s.listed_series={SET_BLITZCLIQUE} +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsTurnPlayer(1-tp) and rp==1-tp and re:IsMonsterEffect() and re:GetHandler():IsRelateToEffect(re) + and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.destg(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_DESTROY,re:GetHandler(),1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) and Duel.Destroy(rc,REASON_EFFECT)>0 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,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + 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 (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.tgfilter(c) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsSpellTrap() 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) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c59138498.lua b/official/c59138498.lua new file mode 100644 index 0000000000..bea0672623 --- /dev/null +++ b/official/c59138498.lua @@ -0,0 +1,108 @@ +--三幻魔の殉教者 +--Martyr of the Sacred Beasts +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If this card is Normal or Special Summoned: You can place 1 "Sacred Beast" Field Spell or "Sacred Beast" Continuous Spell/Trap from your Deck face-up on your field + local e1a=Effect.CreateEffect(c) + e1a:SetDescription(aux.Stringid(id,0)) + 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.pltg) + e1a:SetOperation(s.plop) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e1b) + --If you control another "Sacred Beast" monster: You can Special Summon 2 "Martyr of the Sacred Beasts" from your hand, Deck, and/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_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --During your opponent's End Phase, if this card and a Level 10 "Sacred Beast" monster are in your GY: 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_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_GRAVE) + 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} +s.listed_series={SET_SACRED_BEAST} +function s.plfilter(c,tp,szone_chk) + return c:IsSetCard(SET_SACRED_BEAST) and not c:IsForbidden() and c:CheckUniqueOnField(tp) + and (c:IsFieldSpell() or (szone_chk and c:IsContinuousSpellTrap())) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local szone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp,szone_chk) + end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + local szone_chk=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp,szone_chk):GetFirst() + if sc then + if sc:IsFieldSpell() then + local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) + if fc then + Duel.SendtoGrave(fc,REASON_RULE) + Duel.BreakEffect() + end + Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) + else + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end + end +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SACRED_BEAST),tp,LOCATION_MZONE,0,1,e:GetHandler()) +end +function s.spfilter(c,e,tp) + return 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)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,2,nil,e,tp) + if #g==2 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thconfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsLevel(10) +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(s.thconfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) +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/c59921227.lua b/official/c59921227.lua new file mode 100644 index 0000000000..d8445c352e --- /dev/null +++ b/official/c59921227.lua @@ -0,0 +1,97 @@ +--雷盟-オルタネータ +--Blitzclique - Alternator +--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) + --Monsters your opponent controls lose 300 ATK/DEF for each Thunder monster you control + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_FIELD) + e1a:SetCode(EFFECT_UPDATE_ATTACK) + e1a:SetRange(LOCATION_SZONE) + e1a:SetTargetRange(0,LOCATION_MZONE) + e1a:SetValue(function(e,c) return -300*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_THUNDER),e:GetHandlerPlayer(),LOCATION_MZONE,0,nil) end) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_UPDATE_DEFENSE) + c:RegisterEffect(e1b) + --You can shuffle 1 other "Blitzclique" card from your hand or face-up field into the Deck; add 1 Thunder monster with a different name from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCost(s.thunderthcost) + e2:SetTarget(s.thunderthtg) + e2:SetOperation(s.thunderthop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) + --You can banish this card from your GY; add 1 "Blitzclique" Spell or "Kowloon, Citadel of the Sky" 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_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.blitzthtg) + e3:SetOperation(s.blitzthop) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e3) +end +s.listed_names={CARD_HIDEOUT_IN_THE_SKY_COULOMB} +s.listed_series={SET_BLITZCLIQUE} +function s.thunderthcostfilter(c,tp) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsAbleToDeckAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) + and Duel.IsExistingMatchingCard(s.thunderthfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) +end +function s.thunderthfilter(c,code) + return c:IsRace(RACE_THUNDER) and not c:IsCode(code) and c:IsAbleToHand() +end +function s.thunderthcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.thunderthcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,c,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local sc=Duel.SelectMatchingCard(tp,s.thunderthcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c,tp):GetFirst() + if sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + else + Duel.HintSelection(sc) + end + Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_COST) + e:SetLabel(sc:GetCode()) +end +function s.thunderthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thunderthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thunderthfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel()) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.blitzthfilter(c) + return ((c:IsSetCard(SET_BLITZCLIQUE) and c:IsSpell()) or c:IsCode(CARD_HIDEOUT_IN_THE_SKY_COULOMB)) and c:IsAbleToHand() +end +function s.blitzthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.blitzthfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.blitzthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.blitzthfilter,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/c61082944.lua b/official/c61082944.lua new file mode 100644 index 0000000000..9a096282d1 --- /dev/null +++ b/official/c61082944.lua @@ -0,0 +1,89 @@ +--霊力回復薬 +--Spiritual Power Recovery Potion +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Banish any number of Spellcaster monsters and/or Spells from your GY; all monsters you currently control gain 200 ATK for each card banished this way, and if they do, you gain 400 LP for each card banished this way + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetCost(s.atkcost) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_END_PHASE) + c:RegisterEffect(e1) + --During your Main Phase: You can banish this card from your GY; Special Summon any number of Spellcaster monsters with different Attributes 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_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_POSSESSED} +function s.atkcostfilter(c) + return (c:IsRace(RACE_SPELLCASTER) or c:IsSpell()) and c:IsAbleToRemoveAsCost() +end +function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.atkcostfilter,tp,LOCATION_GRAVE,0,1,nil) end + local max_count=Duel.GetMatchingGroupCount(s.atkcostfilter,tp,LOCATION_GRAVE,0,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.atkcostfilter,tp,LOCATION_GRAVE,0,1,max_count,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) + e:SetLabel(#g) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end + local banish_count=e:GetLabel() + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,200*banish_count) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,400*banish_count) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) + if #g==0 then return end + local prev_atk=0 + local c=e:GetHandler() + local banish_count=e:GetLabel() + local atk=200*banish_count + local atk_change_chk=false + for atkc in g:Iter() do + prev_atk=atkc:GetAttack() + --All monsters you currently control gain 200 ATK for each card banished this way + atkc:UpdateAttack(atk,RESET_EVENT|RESETS_STANDARD,c) + if not atk_change_chk and atkc:GetAttack()>prev_atk then + atk_change_chk=true + end + end + if not atk_change_chk then return end + Duel.Recover(tp,400*banish_count,REASON_EFFECT) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_SPELLCASTER) 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) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft<=0 then return end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) + if #g==0 then return end + local max_attribute_count=g:GetClassCount(Card.GetAttribute) + ft=math.min(ft,max_attribute_count) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local sg=aux.SelectUnselectGroup(g,e,tp,1,max_attribute_count,aux.dpcheck(Card.GetAttribute),1,tp,HINTMSG_SPSUMMON) + if #sg>0 then + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c62104532.lua b/official/c62104532.lua new file mode 100644 index 0000000000..b191c23e26 --- /dev/null +++ b/official/c62104532.lua @@ -0,0 +1,66 @@ +--RUM-幻影騎士団レクイエム +--The Phantom Knights' Rank-Up-Magic Requiem +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --Target 1 "The Phantom Knights" or "Xyz Dragon" monster in your GY or banishment; Special Summon it (but negate its effects), then Special Summon from your Extra Deck, 1 "The Phantom Knights" or "Xyz Dragon" Xyz Monster that is 1 Rank higher than a DARK Xyz Monster you control, by using that monster as material (this is treated as an Xyz Summon, transfer its materials) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) + 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) + c:RegisterEffect(e1) +end +s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON} +function s.fieldxyzfilter(c,e,tp) + local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) + if not (#pg==0 or (#pg==1 and pg:IsContains(c))) then return false end + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsXyzMonster() and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.xyzspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1) +end +function s.xyzspfilter(c,e,tp,mc,rank) + if c.rum_limit and not c.rum_limit(mc,e) then return false end + return c:IsSetCard({SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON}) and c:IsXyzMonster() and c:IsRank(rank) and mc:IsCanBeXyzMaterial(c,tp) + and mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) +end +function s.gybanspfilter(c,e,tp,field_xyz_chk) + return c:IsSetCard({SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON}) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and (field_xyz_chk or s.fieldxyzfilter(c,e,tp)) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local field_xyz_chk=Duel.IsExistingMatchingCard(s.fieldxyzfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.gybanspfilter(chkc,e,tp,field_xyz_chk) end + if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.gybanspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp,field_xyz_chk) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.gybanspfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp,field_xyz_chk) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,LOCATION_EXTRA) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + tc:NegateEffects(e:GetHandler()) + if Duel.SpecialSummonComplete()==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) + local mc=Duel.SelectMatchingCard(tp,s.fieldxyzfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() + if not mc then return end + Duel.HintSelection(mc) + if mc:IsImmuneToEffect(e) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local xyz=Duel.SelectMatchingCard(tp,s.xyzspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mc,mc:GetRank()+1):GetFirst() + if xyz then + xyz:SetMaterial(mc) + Duel.Overlay(xyz,mc) + Duel.BreakEffect() + if Duel.SpecialSummon(xyz,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then + xyz:CompleteProcedure() + end + end + end +end \ No newline at end of file diff --git a/official/c63926180.lua b/official/c63926180.lua new file mode 100644 index 0000000000..96c5648aee --- /dev/null +++ b/official/c63926180.lua @@ -0,0 +1,99 @@ +--神霊剣アイワス +--Spirit Sword Aiwass +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate 1 of these effects; you cannot declare attacks for the rest of this turn, except with Fusion Monsters + 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_names={84288367} --"Aiwass, Divine Spirit of the Law" +s.listed_series={SET_ALEISTER} +function s.spfilter(c,e,tp) + return c:IsCode(84288367) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.tgbanfilter(c) + return c:IsSetCard(SET_ALEISTER) and c:IsMonster() and (c:IsAbleToGrave() or c:IsAbleToRemove()) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + --● Special Summon 1 "Aiwass, Divine Spirit of the Law" from your Deck or GY + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) + --● Send to the GY, or banish, 1 "Aleister" monster from your Deck + local b2=Duel.IsExistingMatchingCard(s.tgbanfilter,tp,LOCATION_DECK,0,1,nil) + --● Look at 3 random face-down cards in your opponent's Extra Deck, and if you do, banish 1 of them + local b3=Duel.IsExistingMatchingCard(aux.AND(Card.IsFacedown,Card.IsAbleToRemove),tp,0,LOCATION_EXTRA,3,nil) + if chk==0 then return b1 or b2 or b3 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + elseif op==2 then + e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) + elseif op==3 then + e:SetCategory(CATEGORY_REMOVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --● Special Summon 1 "Aiwass, Divine Spirit of the Law" from your Deck or GY + if 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_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 + elseif op==2 then + --● Send to the GY, or banish, 1 "Aleister" monster from your Deck + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,4)) + local sc=Duel.SelectMatchingCard(tp,s.tgbanfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc then + op=Duel.SelectEffect(tp, + {sc:IsAbleToGrave(),aux.Stringid(id,5)}, + {sc:IsAbleToRemove(),aux.Stringid(id,6)}) + if op==1 then + Duel.SendtoGrave(sc,REASON_EFFECT) + elseif op==2 then + Duel.Remove(sc,POS_FACEUP,REASON_EFFECT) + end + end + elseif op==3 then + --● Look at 3 random face-down cards in your opponent's Extra Deck, and if you do, banish 1 of them + local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA):RandomSelect(tp,3) + if #g>0 then + Duel.ConfirmCards(tp,g) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local rg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil) + if #rg>0 then + Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) + end + Duel.ShuffleExtra(1-tp) + end + end + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,7)) + --You cannot declare attacks for the rest of this turn, except with Fusion 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:IsFusionMonster() end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c64049762.lua b/official/c64049762.lua new file mode 100644 index 0000000000..dd6dc6960d --- /dev/null +++ b/official/c64049762.lua @@ -0,0 +1,117 @@ +--雷盟-ブレイクアウェイ +--Blitzclique - Breakaway +--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,0}) + 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) + --If a card(s) is destroyed by your "Blitzclique" card's effect, while this card is in your GY: You can add this card to your 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_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.selfthcon) + e2:SetTarget(s.selfthtg) + e2:SetOperation(s.selfthop) + c:RegisterEffect(e2) +end +s.listed_series={SET_BLITZCLIQUE} +function s.plfilter(c,tp) + return c:IsSetCard(SET_BLITZCLIQUE) and c:IsContinuousTrap() and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.descostfilter(c,hc) + return c:IsRace(RACE_THUNDER) and c:IsFaceup() and c:IsAbleToHandAsCost() + and Duel.IsExistingTarget(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c:GetEquipGroup()+c+hc) +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if c:IsLocation(LOCATION_HAND) then ft=ft-1 end + --● Place 1 "Blitzclique" Continuous Trap from your Deck face-up on your field + local b1=ft>0 and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) + --● Return 1 Thunder monster you control to the hand, then target 1 card on the field; destroy it + local b2=Duel.IsExistingMatchingCard(s.descostfilter,tp,LOCATION_MZONE,0,1,nil,c) + if chk==0 then return b1 or b2 end + local cd=e:GetChainData() + cd.choice=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + if cd.choice==2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectMatchingCard(tp,s.descostfilter,tp,LOCATION_MZONE,0,1,1,nil,c) + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_COST) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)==2 and chkc:IsOnField() and chkc~=c end + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if c:IsLocation(LOCATION_HAND) then ft=ft-1 end + --● Place 1 "Blitzclique" Continuous Trap from your Deck face-up on your field + local b1=ft>0 and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) + --● Return 1 Thunder monster you control to the hand, then target 1 card on the field; destroy it + local b2=Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) + if chk==0 then return b1 or b2 end + local cd=e:GetChainData() + cd.choice=cd.choice + or Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + if cd.choice==1 then + e:SetCategory(0) + e:SetProperty(0) + elseif cd.choice==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,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local cd=e:GetChainData() + if cd.choice==1 then + --● Place 1 "Blitzclique" Continuous Trap from your Deck face-up on your field + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + if sc then + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end + elseif cd.choice==2 then + --● Return 1 Thunder monster you control to the hand, then target 1 card on the field; destroy it + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end + end +end +function s.selfthcon(e,tp,eg,ep,ev,re,r,rp) + return rp==tp and re and not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) + and re:GetHandler() and re:GetHandler():IsSetCard(SET_BLITZCLIQUE) +end +function s.selfthtg(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.selfthop(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 diff --git a/official/c65861210.lua b/official/c65861210.lua new file mode 100644 index 0000000000..0d4ecb801a --- /dev/null +++ b/official/c65861210.lua @@ -0,0 +1,97 @@ +--三幻魔の失楽園 +--Fallen Paradise of the Sacred Beasts +--Scripted by Eerie Code +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) + --Thrice per turn: You can send 3 other cards of the same type (Monster, Spell, or Trap) from your hand and/or face-up field to the GY, then you can Special Summon 1 "Sacred Beast" monster from your hand, Deck, GY, or banishment, and if you do, it is unaffected by your opponent's activated Spell/Trap effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(3) + e1:SetTarget(s.gytg) + e1:SetOperation(s.gyop) + c:RegisterEffect(e1) + --If you control a "Sacred Beast" monster whose original Level is 10: You can draw 2 cards + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetRange(LOCATION_FZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(s.drcon) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SACRED_BEAST} +function s.gyfilter(c) + return c:IsAbleToGrave() and (c:IsFaceup() or not c:IsOnField()) +end +function s.rescon(sg,e,tp,mg) + return sg:GetClassCount(Card.GetMainCardType)==1 +end +local LOCATIONS_HAND_DECK_GRAVE_REMOVED=LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED +function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.gyfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,e:GetHandler()) + return aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) + end + Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,3,tp,LOCATION_HAND|LOCATION_ONFIELD) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATIONS_HAND_DECK_GRAVE_REMOVED) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_SACRED_BEAST) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) + and c:IsCanBeSpecialSummoned(e,0,tp,false,true) +end +function s.gyop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(s.gyfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,c) + if #g<3 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TOGRAVE) + if #sg==3 and Duel.SendtoGrave(sg,REASON_EFFECT)==3 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATIONS_HAND_DECK_GRAVE_REMOVED,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATIONS_HAND_DECK_GRAVE_REMOVED,0,1,1,nil,e,tp):GetFirst() + if not sc then return end + Duel.BreakEffect() + if Duel.SpecialSummonStep(sc,0,tp,tp,false,true,POS_FACEUP) then + --It is unaffected by your opponent's activated Spell/Trap effects + 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_IMMUNE_EFFECT) + e1:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() and te:IsSpellTrapEffect() end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end + Duel.SpecialSummonComplete() + end +end +function s.drconfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsOriginalLevel(10) and c:IsFaceup() +end +function s.drcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.drconfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end + Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(2) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) +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 \ No newline at end of file diff --git a/official/c67216732.lua b/official/c67216732.lua new file mode 100644 index 0000000000..d2f3a152b3 --- /dev/null +++ b/official/c67216732.lua @@ -0,0 +1,84 @@ +--S-Force ナイトスレイヤー +--S-Force Nightslayer +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 monsters, including an "S-Force" monster + Link.AddProcedure(c,nil,2,2,s.lcheck) + --If this card is Special Summoned: You can add 1 "S-Force" Spell/Trap from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + 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.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --(Quick Effect): You can banish this card you control and 1 "S-Force" card from your hand; Special Summon 1 "S-Force" monster from your Deck or Extra Deck, except "S-Force Nightslayer" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.AND(Cost.Replaceable(s.spcost,s.extracon),Cost.SelfBanish)) + 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.listed_names={id} +s.listed_series={SET_S_FORCE} +function s.lcheck(g,lc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_S_FORCE,lc,sumtype,tp) +end +function s.thfilter(c) + return c:IsSetCard(SET_S_FORCE) 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.spcostfilter(c) + return c:IsSetCard(SET_S_FORCE) and c:IsAbleToRemoveAsCost() +end +function s.spfilter(c,e,tp,hc) + if c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,hc)<=0 then return false end + if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,hc,c)<=0 then return false end + return c:IsSetCard(SET_S_FORCE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,nil) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,c) + Duel.Remove(g+c,POS_FACEUP,REASON_COST) + return false --avoid performing Cost.SelfBanish if the cost isn't replaced, since the handler is already banished in this function +end +function s.extracon(base,e,tp,eg,ep,ev,re,r,rp,exc) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,exc,e,tp,e:GetHandler()) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,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,true,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c6772168.lua b/official/c6772168.lua new file mode 100644 index 0000000000..bd48cac2e8 --- /dev/null +++ b/official/c6772168.lua @@ -0,0 +1,67 @@ +--召喚獣オーケアノス +--Invoked Okeanos +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Aleister" monster + 1 DARK or WATER monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ALEISTER),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK|ATTRIBUTE_WATER)) + --While this card is in the Main Monster Zone, your opponent's monsters cannot target monsters for attacks, except this one + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) + e1:SetRange(LOCATION_MMZONE) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetValue(function(e,c) return c~=e:GetHandler() end) + c:RegisterEffect(e1) + --While this card is in the Extra Monster Zone, any monster sent to your opponent's GY is banished instead + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) + e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) + e2:SetRange(LOCATION_EMZONE) + e2:SetTarget(s.rmtarget) + e2:SetTargetRange(LOCATION_ALL,LOCATION_ALL) + e2:SetValue(LOCATION_REMOVED) + c:RegisterEffect(e2) + --You can banish this card from your GY, then target 1 Fusion Monster you control; it can attack directly this turn. You can only use this effect of "Invoked Okeanos" once per turn + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,id) + e3:SetCondition(function(e,tp) return Duel.IsAbleToEnterBP() end) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.diratktg) + e3:SetOperation(s.diratkop) + c:RegisterEffect(e3) +end +s.listed_series={SET_ALEISTER} +s.material_setcode={SET_ALEISTER} +function s.rmtarget(e,c) + local tp=e:GetHandlerPlayer() + return not (c:IsOwner(tp) or c:IsSpellTrap() or c:IsLocation(LOCATION_OVERLAY)) and Duel.IsPlayerCanRemove(tp,c) +end +function s.diratktgfilter(c) + return c:IsFusionMonster() and c:IsFaceup() and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) +end +function s.diratktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.diratktgfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.diratktgfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + Duel.SelectTarget(tp,s.diratktgfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.diratkop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + --It can attack directly this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3205) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_DIRECT_ATTACK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c70383419.lua b/official/c70383419.lua new file mode 100644 index 0000000000..b45fc25b2c --- /dev/null +++ b/official/c70383419.lua @@ -0,0 +1,88 @@ +--召喚獣ベイバロン +--Invoked Babalon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Aleister" monster + 1 LIGHT or EARTH monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ALEISTER),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT|ATTRIBUTE_EARTH)) + --If this card is Special Summoned: You can add 1 "Virakam the Artificial Spirit" or "Magical Name - "Rosa Mundi"" from your Deck to your hand, then you can banish 1 monster from either GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE) + 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.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --You can banish this card from your GY, then target 1 Fusion Monster you control; all monsters your opponent currently controls lose ATK equal to that monster's until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE) + 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.atktg) + e2:SetOperation(s.atkop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ALEISTER} +s.material_setcode={SET_ALEISTER} +s.listed_names={10673071,86319972} --"Virakam, the Divine Spirit of Artifice", "Gamma Summon" +function s.thfilter(c) + return c:IsCode(10673071,86319972) 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_REMOVE,nil,1,PLAYER_EITHER,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,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.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToRemove),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local rg=Duel.SelectMatchingCard(tp,aux.AND(Card.IsMonster,Card.IsAbleToRemove),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) + if #rg>0 then + Duel.HintSelection(rg) + Duel.BreakEffect() + Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) + end + end + 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:IsFusionMonster() and chkc:HasNonZeroAttack() end + if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsFusionMonster,Card.HasNonZeroAttack),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,aux.AND(Card.IsFusionMonster,Card.HasNonZeroAttack),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,tp,g:GetFirst():GetAttack()) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end + local atk=tc:GetAttack() + if atk<=0 then return end + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) + if #g==0 then return end + local c=e:GetHandler() + for oc in g:Iter() do + --All monsters your opponent currently controls lose ATK equal to that monster's until the end of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(-atk) + e1:SetReset(RESETS_STANDARD_PHASE_END) + oc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c70405001.lua b/official/c70405001.lua new file mode 100644 index 0000000000..f94107a2e5 --- /dev/null +++ b/official/c70405001.lua @@ -0,0 +1,74 @@ +--光と闇の戦士カオス・ソルジャー +--Black Luster Soldier - Soldier of Light and Darkness +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Cannot be destroyed by battle + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(1) + c:RegisterEffect(e1) + --Unaffected by your opponent's activated effects, unless they target this card + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_IMMUNE_EFFECT) + e2:SetRange(LOCATION_MZONE) + e2:SetValue(s.immval) + c:RegisterEffect(e2) + --If this card is Special Summoned: You can target 1 card your opponent controls; banish it + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_REMOVE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetCountLimit(1,{id,0}) + e3:SetTarget(s.bantg) + e3:SetOperation(s.banop) + c:RegisterEffect(e3) + --When this card destroys an opponent's monster by battle: You can make this card gain 1500 ATK, and if you do, it can make a second attack in a row + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_ATKCHANGE) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetCode(EVENT_BATTLE_DESTROYING) + e4:SetCountLimit(1,{id,1}) + e4:SetCondition(s.atkcon) + e4:SetOperation(s.atkop) + c:RegisterEffect(e4) +end +s.listed_names={CARD_LIGHT_AND_DARKNESS_RITUAL} +function s.immval(e,re) + if not (re:IsActivated() and e:GetOwnerPlayer()==1-re:GetOwnerPlayer()) then return false end + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end + local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) + return not (tg and tg:IsContains(e:GetHandler())) +end +function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() 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 +function s.atkcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) and c:CanChainAttack() +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToBattle() and c:UpdateAttack(1500)>0 then + Duel.ChainAttack() + end +end \ No newline at end of file diff --git a/official/c71222649.lua b/official/c71222649.lua new file mode 100644 index 0000000000..ba296927fd --- /dev/null +++ b/official/c71222649.lua @@ -0,0 +1,118 @@ +--薄明の魔 レイラージュ +--Rayrage, the Twilight Fiend +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --If a Pendulum Monster(s) you control would be destroyed by an opponent's card effect, you can destroy this card instead of 1 of those Pendulum Monsters. You can only use this effect of "Rayrage, the Twilight Fiend" once per turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EFFECT_DESTROY_REPLACE) + e1:SetRange(LOCATION_PZONE) + e1:SetTarget(s.reptg) + e1:SetOperation(s.repop) + e1:SetValue(function(e,c) return c==e:GetLabelObject():GetFirst() end) + c:RegisterEffect(e1) + --If this card is in your hand: You can target 1 Pendulum Monster you control; place that Pendulum Monster in your Pendulum Zone (but it cannot activate its Pendulum Effects this turn), and if you do, Special Summon this card + 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_HAND) + e2:SetCountLimit(1,{id,0}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --(Quick Effect): You can Tribute this card, then target 1 card in your Pendulum Zone; it cannot be destroyed by your opponent's card effects this turn + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + 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,1}) + e3:SetCost(Cost.SelfTribute) + e3:SetTarget(s.efftg) + e3:SetOperation(s.effop) + c:RegisterEffect(e3) +end +function s.repfilter(c,tp,opp) + return c:IsPendulumMonster() and c:IsControler(tp) and c:IsOnField() and c:IsReasonPlayer(opp) + and c:IsFaceup() and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) +end +function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) + local opp=1-tp + local c=e:GetHandler() + if chk==0 then return not Duel.HasFlagEffect(tp,id) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) + and eg:IsExists(s.repfilter,1,nil,tp,opp) end + if Duel.SelectEffectYesNo(tp,c,96) then + Duel.Hint(HINT_CARD,0,id) + local g=eg:Filter(s.repfilter,nil,tp,opp) + if #g>1 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) + g=g:Select(tp,1,1,nil) + Duel.HintSelection(g) + end + e:SetLabelObject(g) + c:SetStatus(STATUS_DESTROY_CONFIRMED,true) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + return true + else return false end +end +function s.repop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + c:SetStatus(STATUS_DESTROY_CONFIRMED,false) + Duel.Destroy(c,REASON_EFFECT|REASON_REPLACE) +end +function s.plfilter(c,tp) + return c:IsPendulumMonster() and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 +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_MZONE) and s.plfilter(chkc,tp) end + local c=e:GetHandler() + if chk==0 then return Duel.CheckPendulumZones(tp) + and Duel.IsExistingTarget(s.plfilter,tp,LOCATION_MZONE,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + Duel.SelectTarget(tp,s.plfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) + and Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then + local c=e:GetHandler() + --It cannot activate its Pendulum Effects this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + end +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_PZONE) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_PZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + Duel.SelectTarget(tp,nil,tp,LOCATION_PZONE,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 + --It cannot be destroyed by your opponent's card effects this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(3060) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetValue(aux.indoval) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c7594154.lua b/official/c7594154.lua new file mode 100644 index 0000000000..66ded9a6fc --- /dev/null +++ b/official/c7594154.lua @@ -0,0 +1,107 @@ +--ぜんなのついなぎひめ +--Zenna-no-Tsuinagihime +--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) + --You can also use 1 monster in your hand as material to Link Summon this card + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EFFECT_EXTRA_MATERIAL) + e0:SetRange(LOCATION_EXTRA) + e0:SetTargetRange(1,0) + e0:SetOperation(function(c,e,tp,sg,mg,lc,og,chk) return sg:FilterCount(Card.HasFlagEffect,nil,id)<=1 end) + e0:SetValue(s.extraval) + c:RegisterEffect(e0) + --If this card is Link Summoned: You can send 1 monster from your Deck to the GY, or if this card was Link Summoned using only monsters you control, you can send 1 monster from your Extra Deck to the GY instead + 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_SPSUMMON_SUCCESS) + e1a:SetCountLimit(1,{id,0}) + e1a:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) + e1a:SetTarget(s.tgtg) + e1a:SetOperation(s.tgop) + c:RegisterEffect(e1a) + local e1b=Effect.CreateEffect(c) + e1b:SetType(EFFECT_TYPE_SINGLE) + e1b:SetCode(EFFECT_MATERIAL_CHECK) + e1b:SetValue(s.matcheck) + e1b:SetLabelObject(e1a) + c:RegisterEffect(e1b) + --During your next Standby Phase after this card was sent from the field to the GY: You can add 1 monster from your GY to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND) + e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2a:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2a:SetRange(LOCATION_GRAVE) + e2a:SetCountLimit(1,{id,1}) + e2a:SetCondition(function(e,tp) local c=e:GetHandler() return Duel.IsTurnPlayer(tp) and c:HasFlagEffect(id) and (c:GetFlagEffectLabel(id)==1 or c:GetTurnID()~=Duel.GetTurnCount()) end) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=Effect.CreateEffect(c) + e2b:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e2b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2b:SetCode(EVENT_TO_GRAVE) + e2b:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e2b:SetOperation(function(e,tp) local ct=(Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY)) and 2 or 1 e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,ct,ct) end) + c:RegisterEffect(e2b) +end +function s.extraval(chk,summon_type,e,...) + if chk==0 then + local tp,sc=... + if summon_type~=SUMMON_TYPE_LINK or sc~=e:GetHandler() then + return Group.CreateGroup() + else + local g=Duel.GetMatchingGroup(aux.NOT(Card.HasFlagEffect),tp,LOCATION_HAND,0,nil,id) + for mc in g:Iter() do + mc:RegisterFlagEffect(id,0,0,1) + end + return g + end + elseif chk==2 then + local g=Duel.GetMatchingGroup(Card.HasFlagEffect,e:GetHandlerPlayer(),LOCATION_HAND,0,nil,id) + for mc in g:Iter() do + mc:ResetFlagEffect(id) + end + end +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + local locations=e:GetLabel()==0 and LOCATION_DECK or LOCATION_DECK|LOCATION_EXTRA + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,locations,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,locations) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + local locations=e:GetLabel()==0 and LOCATION_DECK or LOCATION_DECK|LOCATION_EXTRA + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,locations,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end +function s.matcheckfilter(c,tp) + return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) +end +function s.matcheck(e,c) + local mg=c:GetMaterial() + e:GetLabelObject():SetLabel(mg:FilterCount(s.matcheckfilter,nil,e:GetHandlerPlayer())==#mg and 1 or 0) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToHand),tp,LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,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.AND(Card.IsMonster,Card.IsAbleToHand),tp,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/c75983808.lua b/official/c75983808.lua new file mode 100644 index 0000000000..c004cae124 --- /dev/null +++ b/official/c75983808.lua @@ -0,0 +1,98 @@ +--混沌のマジック・ボックス +--Mystic Box of Chaos +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --When your opponent activates a card or effect that targets another card(s) you control: Return 1 of those cards you control to the hand (if face-down, reveal it briefly to check), and if you do, destroy 1 card on the field, then you can Special Summon 1 monster that mentions "Ritual of Light and Darkness" from your hand, with a different name than the returned card, ignoring its Summoning conditions + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCondition(s.thdescon) + e1:SetTarget(s.thdestg) + e1:SetOperation(s.thdesop) + c:RegisterEffect(e1) + --If this card in its owner's possession is destroyed by an opponent's card: You can Special Summon 1 Ritual Monster that mentions "Ritual of Light and Darkness" from your hand or Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_LIGHT_AND_DARKNESS_RITUAL} +function s.thdesconfilter(c,tp) + return c:IsControler(tp) and c:IsOnField() and c:IsAbleToHand() +end +function s.thdescon(e,tp,eg,ep,ev,re,r,rp) + if not (rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return tg and tg:IsExists(s.thdesconfilter,1,e:GetHandler(),tp) +end +function s.thdestg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end + local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.thconfilter(c,re,tp) + return c:IsRelateToEffect(re) and c:IsControler(tp) +end +function s.handspfilter(c,e,tp,code) + return c:IsMonster() and c:ListsCode(CARD_LIGHT_AND_DARKNESS_RITUAL) and not c:IsCode(code) + and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.thdesop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(s.thconfilter,nil,re,tp) + if #tg==0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local sc=tg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil):GetFirst() + if not sc then return end + if sc:IsFaceup() then + Duel.HintSelection(sc) + else + Duel.ConfirmCards(1-tp,sc) + end + if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + Duel.ShuffleHand(sc:GetControler()) + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,exc) + if #g==0 then return end + Duel.HintSelection(g) + local code=sc:GetCode() + if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.handspfilter,tp,LOCATION_HAND,0,1,nil,e,tp,code) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectMatchingCard(tp,s.handspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,code) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) + end + end + end +end +function s.ritualspfilter(c,e,tp) + return c:IsRitualMonster() and c:ListsCode(CARD_LIGHT_AND_DARKNESS_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) +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.ritualspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|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.ritualspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c78449284.lua b/official/c78449284.lua new file mode 100644 index 0000000000..d69cd09fd5 --- /dev/null +++ b/official/c78449284.lua @@ -0,0 +1,96 @@ +--幻影騎士団マレヴォレンスサイス +--The Phantom Knights of Malevolent Scythe +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 3 DARK monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),3,2) + --You can detach 1 material from this card; Special Summon 1 "The Phantom Knights" monster from your Deck + 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:SetCost(Cost.DetachFromSelf(1)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If you Xyz Summon an "Xyz Dragon" monster while this card is in the Monster Zone: You can add 1 "Rank-Up-Magic" Spell 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_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.deckthcon) + e2:SetTarget(s.deckthtg) + e2:SetOperation(s.deckthop) + c:RegisterEffect(e2) + --If this card is destroyed: You can add 1 of your banished "The Phantom Knights" cards to your hand, except an Xyz Monster + 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_DESTROYED) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.banthtg) + e3:SetOperation(s.banthop) + c:RegisterEffect(e3) +end +s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_XYZ_DRAGON,SET_RANK_UP_MAGIC} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) 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.deckthconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsXyzSummoned() and c:IsSetCard(SET_XYZ_DRAGON) and c:IsFaceup() +end +function s.deckthcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.deckthconfilter,1,nil,tp) +end +function s.deckthfilter(c) + return c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsSpell() 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 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + end +end +function s.banthfilter(c) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and not c:IsXyzMonster() and c:IsFaceup() and c:IsAbleToHand() +end +function s.banthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.banthfilter,tp,LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED) +end +function s.banthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.banthfilter,tp,LOCATION_REMOVED,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/c7894706.lua b/official/c7894706.lua new file mode 100644 index 0000000000..ac33963962 --- /dev/null +++ b/official/c7894706.lua @@ -0,0 +1,91 @@ +--混沌の三幻魔 +--Phantasmal Sacred Beasts of Chaos +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 3 Level 10 monsters that cannot be Normal Summoned/Set + Fusion.AddProcFunRep(c,s.matfilter,3,true) + --Must be either Fusion Summoned, or Special Summoned (from your Extra Deck) by sending the above cards you control to the GY + c:AddMustBeFusionSummoned() + Fusion.AddContactProc(c,s.contactfil,s.contactop,false,nil,1) + --You can only Special Summon "Phantasmal Sacred Beasts of Chaos" once per turn this way, no matter which method you use + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetCondition(s.regcon) + e0:SetOperation(s.regop) + c:RegisterEffect(e0) + --The first two times this card would be destroyed by card effect each turn, it is not destroyed + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(2) + e1:SetValue(function(e,re,r) return (r&REASON_EFFECT)>0 end) + c:RegisterEffect(e1) + --Once per Chain and thrice per turn (Quick Effect): You can target 1 face-up monster your opponent controls; negate its effects (until the end of this turn), then you can gain LP equal to half its ATK + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE+CATEGORY_RECOVER) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(3) + e2:SetCost(Cost.SoftOncePerChain(id)) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + 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) + return c:IsLevel(10) and not c:IsSummonableCard() +end +function s.contactfil(tp) + return Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,nil) +end +function s.contactop(g) + Duel.SendtoGrave(g,REASON_COST|REASON_MATERIAL) +end +function s.regcon(e) + local c=e:GetHandler() + return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + --You can only Special Summon "Phantasmal Sacred Beasts of Chaos" once per turn this way, no matter which method you use + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCode(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +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 chkc:IsNegatableMonster() end + if chk==0 then return Duel.IsExistingTarget(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local tc=Duel.SelectTarget(tp,Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + Duel.SetTargetPlayer(tp) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,math.floor(tc:GetAttack()/2)) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then + --Negate its effects (until the end of this turn) + tc:NegateEffects(e:GetHandler(),RESETS_STANDARD_PHASE_END) + Duel.AdjustInstantly(tc) + local lp=math.floor(tc:GetAttack()/2) + if lp>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) + Duel.BreakEffect() + Duel.Recover(p,lp,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/official/c79561872.lua b/official/c79561872.lua new file mode 100644 index 0000000000..daf7155c9a --- /dev/null +++ b/official/c79561872.lua @@ -0,0 +1,92 @@ +--わくどきメルフィーズ +--Excited Melffys +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Melffy" monster + 1 Beast monster + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MELFFY),aux.FilterBoolFunctionEx(Card.IsRace,RACE_BEAST)) + --If this card is Fusion Summoned: You can target an equal number of "Melffy" cards you control and cards your opponent controls; return them to the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND) + 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) return e:GetHandler():IsFusionSummoned() end) + e1:SetTarget(s.rthtg) + e1:SetOperation(s.rthop) + c:RegisterEffect(e1) + --If your opponent Normal or Special Summons a monster(s) (except during the Damage Step), or if an opponent's monster targets this card for an attack: You can target 1 Beast monster in your GY; decrease this card's Level by 2, and if you do, Special Summon that monster + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_LVCHANGE+CATEGORY_SPECIAL_SUMMON) + e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetRange(LOCATION_MZONE) + e2a:SetCountLimit(1,{id,1}) + e2a:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) + e2a:SetTarget(s.sptg) + e2a:SetOperation(s.spop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + local e2c=e2a:Clone() + e2c:SetCode(EVENT_BE_BATTLE_TARGET) + e2c:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==e:GetHandler() end) + c:RegisterEffect(e2c) +end +s.listed_series={SET_MELFFY} +s.material_setcode={SET_MELFFY} +function s.rthandrescon(maxc) + return function(sg,e,tp,mg) + local ct1=sg:FilterCount(Card.IsControler,nil,tp) + local ct2=#sg-ct1 + return ct1==ct2,ct1>maxc or ct2>maxc + end +end +function s.rthfilter(c,opp) + return (c:IsControler(opp) or (c:IsSetCard(SET_MELFFY) and c:IsFaceup())) and c:IsAbleToHand() +end +function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local opp=1-tp + if chk==0 then return Duel.IsExistingTarget(s.rthfilter,tp,LOCATION_ONFIELD,0,1,nil,opp) + and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + local g=Duel.GetTargetGroup(s.rthfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,opp) + local ct=g:FilterCount(Card.IsControler,nil,tp) + local rescon=s.rthandrescon(math.min(ct,#g-ct)) + local tg=aux.SelectUnselectGroup(g,e,tp,2,#g,rescon,1,tp,HINTMSG_RTOHAND,rescon) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,#tg,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 +function s.spfilter(c,e,tp) + return c:IsRace(RACE_BEAST) 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 s.spfilter(chkc,e,tp) end + if chk==0 then return c:HasLevel() and c:IsLevelAbove(3) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,c,1,tp,-2) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,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 c:IsLevelAbove(3) and c:IsFaceup() and c:UpdateLevel(-2)==-2 + 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/c82344137.lua b/official/c82344137.lua new file mode 100644 index 0000000000..5ec090c948 --- /dev/null +++ b/official/c82344137.lua @@ -0,0 +1,99 @@ +--始まりの神ファーラ +--Phara, the Goddess of the Beginning +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can reveal this card and 1 Spell/Trap in your hand; neither player can activate cards or effects in response to the card or effect activation of a card with the same name as the revealed Spell/Trap until the end of the next turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(s.effcost) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --If this card is sent from the hand or field to the GY by Spell/Trap effect: You can Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --If this card is Special Summoned from the GY: You can take control of the 1 monster your opponent controls with the highest ATK (your choice, if tied) + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_CONTROL) + 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.ctrltg) + e3:SetOperation(s.ctrlop) + c:RegisterEffect(e3) +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsPublic() and Duel.IsExistingMatchingCard(aux.AND(Card.IsSpellTrap,aux.NOT(Card.IsPublic)),tp,LOCATION_HAND,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,aux.AND(Card.IsSpellTrap,aux.NOT(Card.IsPublic)),tp,LOCATION_HAND,0,1,1,c):GetFirst() + Duel.ConfirmCards(1-tp,Group.FromCards(c,rc)) + Duel.ShuffleHand(tp) + e:SetLabel(rc:GetOriginalCodeRule()) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,1,aux.Stringid(id,3),nil,2) + local revealed_card_code=e:GetLabel() + --Neither player can activate cards or effects in response to the card or effect activation of a card with the same name as the revealed Spell/Trap until the end of the next turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAINING) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) + local trig_code1,trig_code2=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2) + if trig_code1==revealed_card_code or trig_code2==revealed_card_code then + return Duel.SetChainLimit(aux.FALSE) + end + end) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) and re and re:IsSpellTrapEffect() +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.ctrltg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack) + if chk==0 then return g and g:IsExists(Card.IsControlerCanBeChanged,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) +end +function s.ctrlop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack) + if not g or #g==0 then return end + g:Match(Card.IsControlerCanBeChanged,nil) + if #g>=2 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + g=g:Select(tp,1,1,nil) + end + if #g>0 then + Duel.HintSelection(g) + Duel.GetControl(g,tp) + end +end diff --git a/official/c83319154.lua b/official/c83319154.lua new file mode 100644 index 0000000000..c797cb1882 --- /dev/null +++ b/official/c83319154.lua @@ -0,0 +1,67 @@ +--時空穿つ遡光 +--Annihilating Retrolight +--scripted by Naim +local s,id=GetID() +local STATUS_SUMMONED_THIS_TURN=STATUS_SUMMON_TURN|STATUS_FLIP_SUMMON_TURN|STATUS_SPSUMMON_TURN +function s.initial_effect(c) + --When your opponent activates the effect of a monster on the field that was not Summoned this turn: Negate the activation, then you can banish (face-down) all face-up monsters your opponent controls that were not Summoned this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCondition(s.negcon) + e1:SetTarget(s.negtg) + e1:SetOperation(s.negop) + c:RegisterEffect(e1) + --If this Set card in its owner's control is destroyed by an opponent's card effect: You can Set 1 Trap from your Deck + 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:SetCondition(s.setcon) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + local trig_location,trig_status=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_STATUS) + return rp==1-tp and re:IsMonsterEffect() and (trig_location&LOCATION_MZONE)>0 and (trig_status&STATUS_SUMMONED_THIS_TURN)==0 + and Duel.IsChainNegatable(ev) +end +function s.notsummonturnfilter(c,tp) + return c:IsFaceup() and not c:IsStatus(STATUS_SUMMONED_THIS_TURN) and c:IsAbleToRemove(c,tp,POS_FACEDOWN) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) + local g=Duel.GetMatchingGroup(s.notsummonturnfilter,tp,0,LOCATION_MZONE,nil,tp) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) then + local g=Duel.GetMatchingGroup(s.notsummonturnfilter,tp,0,LOCATION_MZONE,nil,tp) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) + end + end +end +function s.setcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPreviousPosition(POS_FACEDOWN) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) + and rp==1-tp and c:IsReason(REASON_EFFECT) +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsTrap,Card.IsSSetable),tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsTrap,Card.IsSSetable),tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end +end \ No newline at end of file diff --git a/official/c83566725.lua b/official/c83566725.lua new file mode 100644 index 0000000000..920dc62e37 --- /dev/null +++ b/official/c83566725.lua @@ -0,0 +1,89 @@ +--幻影騎士団ドゥームソルレット +--The Phantom Knights of Doomed Solleret +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --If you control no monsters, you can Special Summon this card (from your hand). You can only Special Summon "The Phantom Knights of Doomed Solleret" once per turn this way + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0},EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --If this card is Normal or Special Summoned: You can Set 1 "The Phantom Knights" Spell/Trap from your Deck + 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_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.settg) + e2a:SetOperation(s.setop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) + --You can banish this card from your GY, then target up to 2 Level/Rank 3 DARK monsters you control; increase their Levels/Ranks by 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_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCost(Cost.SelfBanish) + e3:SetTarget(s.lvtg) + e3:SetOperation(s.lvop) + c:RegisterEffect(e3) +end +s.listed_series={SET_THE_PHANTOM_KNIGHTS} +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 +end +function s.setfilter(c) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) 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_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) +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_DECK,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end +end +function s.lvfilter(c) + return (c:IsLevel(3) or c:IsRank(3)) and c:IsAttribute(ATTRIBUTE_DARK) 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 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,2,nil) +end +function s.lvop(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() + for tc in tg:Iter() do + --Increase their Levels/Ranks by 1 + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + if tc:HasLevel() then + e1:SetCode(EFFECT_UPDATE_LEVEL) + else + e1:SetCode(EFFECT_UPDATE_RANK) + end + e1:SetValue(1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c84031736.lua b/official/c84031736.lua new file mode 100644 index 0000000000..bab2fa209f --- /dev/null +++ b/official/c84031736.lua @@ -0,0 +1,96 @@ +--道化の一座『終演』 +--Clown Crew "Finale" +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --If you control a Tribute Summoned monster: Discard any number of cards, then target that many face-up cards on the field; destroy them + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(Card.IsTributeSummoned,tp,LOCATION_MZONE,0,1,nil) end) + e1:SetCost(s.cost) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetCountLimit(1,{id,0}) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --You can banish this card from your GY and Tribute 1 Ritual, Fusion, Synchro, Xyz, Pendulum, or Link Monster from your hand or field; add 1 "Clown Crew" monster from your Deck or GY to your hand with a different original Level/Rank/Link Rating than the Tributed monster's + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetCost(Cost.AND(Cost.SelfBanish,s.thcost)) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + e2:SetCountLimit(1,{id,1}) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_CLOWN_CREW} +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-1) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end + local max_target_count=Duel.GetTargetCount(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) + local discard_count=Duel.DiscardHand(tp,nil,1,max_target_count,REASON_COST|REASON_DISCARD,nil) + e:SetLabel(discard_count) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc~=c end + if chk==0 then + local cost_chk=e:GetLabel()==-1 + e:SetLabel(0) + return cost_chk and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) + end + local target_count=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local tg=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,target_count,target_count,c) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,#tg,tp,0) +end +function s.activate(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.rating(c) + if c:IsLinkMonster() then return c:GetLink() + elseif c:IsXyzMonster() then return c:GetOriginalRank() + else return c:GetOriginalLevel() end +end +function s.thcostfilter(c,tp) + return c:IsType(TYPE_RITUAL|TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ|TYPE_PENDULUM|TYPE_LINK) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,s.rating(c)) +end +function s.thfilter(c,lv) + return c:IsSetCard(SET_CLOWN_CREW) and c:IsMonster() and c:IsAbleToHand() and s.rating(c)~=lv +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-1) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.thcostfilter,1,1,true,nil,nil,tp) end + local sc=Duel.SelectReleaseGroupCost(tp,s.thcostfilter,1,1,true,nil,nil,tp):GetFirst() + Duel.Release(sc,REASON_COST) + e:SetLabel(s.rating(sc)) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local cost_chk=e:GetLabel()==-1 + e:SetLabel(0) + return cost_chk + 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 sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e:GetLabel()):GetFirst() + if sc then + if sc:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(sc) end + Duel.SendtoHand(sc,nil,REASON_EFFECT) + if sc:IsPreviousLocation(LOCATION_DECK) then Duel.ConfirmCards(1-tp,sc) end + end +end \ No newline at end of file diff --git a/official/c84288367.lua b/official/c84288367.lua new file mode 100644 index 0000000000..c5aa5ddb4c --- /dev/null +++ b/official/c84288367.lua @@ -0,0 +1,87 @@ +--法の神霊アイワス +--Aiwass the Spirit of the Law +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --You can banish this card from your hand or field; add 1 "Aleister" monster from your Deck to your hand, then if this effect was activated on the field, immediately after this effect resolves, you can Normal Summon 1 Spellcaster monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfBanish) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --If a face-up Fusion Monster(s) you control is sent to the GY, except by battle, while this card is in your GY: You can Special Summon this card, then you can Fusion Summon 1 "Invoked" monster, using monsters from your hand or field + 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,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_TO_GRAVE) + 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_ALEISTER,SET_INVOKED} +function s.thfilter(c) + return c:IsSetCard(SET_ALEISTER) and c:IsMonster() 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) + local trigger_loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION) + if (trigger_loc&LOCATION_MZONE)>0 then + Duel.SetPossibleOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) + end +end +function s.nsfilter(c) + return c:IsRace(RACE_SPELLCASTER) and c:IsSummonable(true,nil) +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) + local trigger_loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION) + if (trigger_loc&LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + 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.BreakEffect() + Duel.Summon(tp,sc,true,nil) + end + end + end +end +function s.spconfilter(c,tp) + return c:IsPreviousPosition(POS_FACEUP) and c:IsFusionMonster() and c:IsPreviousLocation(LOCATION_MZONE) + and c:IsPreviousControler(tp) and not c:IsReason(REASON_BATTLE) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and 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) + Duel.SetPossibleOperationInfo(0,CATEGORY_FUSION_SUMMON,nil,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 fusion_params={handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_INVOKED)} + if Fusion.SummonEffTG(fusion_params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + Duel.BreakEffect() + Fusion.SummonEffOP(fusion_params)(e,tp,eg,ep,ev,re,r,rp,1) + end + end +end \ No newline at end of file diff --git a/official/c84401954.lua b/official/c84401954.lua new file mode 100644 index 0000000000..c4e8b6fb29 --- /dev/null +++ b/official/c84401954.lua @@ -0,0 +1,83 @@ +--グレイン・ブリッツクリーク +--Grain Blitzclique +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --You can reveal this card in your hand, then target 1 Spell/Trap on the field; destroy it, and if you do, Special Summon 1 Thunder monster from your hand, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --If another card(s) is destroyed by card effect, while this card is in the Monster Zone: You can add 1 "Blitzclique" Spell or "Kowloon, Citadel of the Sky" from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsReason,1,nil,REASON_EFFECT) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_HIDEOUT_IN_THE_SKY_COULOMB} +s.listed_series={SET_BLITZCLIQUE} +function s.desfilter(c,tp) + return c:IsSpellTrap() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +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.GetLocationCount(tp,LOCATION_MZONE)>0 then + 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 + --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + 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 (c:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thfilter(c) + return ((c:IsSetCard(SET_BLITZCLIQUE) and c:IsSpell()) or c:IsCode(CARD_HIDEOUT_IN_THE_SKY_COULOMB)) 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/c85257384.lua b/official/c85257384.lua new file mode 100644 index 0000000000..d84e9f633e --- /dev/null +++ b/official/c85257384.lua @@ -0,0 +1,81 @@ +--幻影騎士団アンブレイジベイル +--The Phantom Knights of Umbrage Veil +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + --If you have a "The Phantom Knights" monster in your field or GY, 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(s.actcon) + c:RegisterEffect(e0) + --Special Summon this card in Defense Position as a Normal Monster (Warrior/DARK/Level 3/ATK 0/DEF 300) (this card is NOT treated as a Trap), then you can change 1 Attack Position monster your opponent controls to Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) + 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) + --You can banish this card from your GY; immediately after this effect resolves, Xyz Summon 1 DARK Xyz Monster + 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:SetCost(Cost.SelfBanish) + e2:SetTarget(s.xyztg) + e2:SetOperation(s.xyzop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_series={SET_THE_PHANTOM_KNIGHTS} +function s.actconfilter(c) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsMonster() and c:IsFaceup() +end +function s.actcon(e) + return Duel.IsExistingMatchingCard(s.actconfilter,e:GetHandlerPlayer(),LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,0,300,3,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,0,300,3,RACE_WARRIOR,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) then + c:AddMonsterAttribute(TYPE_NORMAL) + Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE) + c:AddMonsterAttributeComplete() + if Duel.SpecialSummonComplete()>0 and Duel.IsExistingMatchingCard(aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,0,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local posg=Duel.SelectMatchingCard(tp,aux.AND(Card.IsAttackPos,Card.IsCanChangePosition),tp,0,LOCATION_MZONE,1,1,nil) + if #posg==0 then return end + Duel.HintSelection(posg) + Duel.BreakEffect() + Duel.ChangePosition(posg,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE) + end + end +end +function s.xyzfilter(c) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsXyzSummonable() +end +function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.xyzop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst() + if sc then + Duel.XyzSummon(tp,sc) + end +end \ No newline at end of file diff --git a/official/c85523502.lua b/official/c85523502.lua new file mode 100644 index 0000000000..d01a2dca14 --- /dev/null +++ b/official/c85523502.lua @@ -0,0 +1,120 @@ +--ウィスカ・ブリッツクリーク +--Wisca Blitzclique +--scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If a card(s) was destroyed by your "Blitzclique" card's effect this turn (Quick Effect): You can reveal this card in your hand; Special Summon up to 3 Thunder monsters from your hand, then you can destroy up to that many cards on the field, also you cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) + e1:SetCost(Cost.SelfReveal) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --Track destroyed cards + aux.GlobalCheck(s,function() + local ge1=Effect.CreateEffect(c) + ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + ge1:SetCode(EVENT_DESTROYED) + ge1:SetOperation(s.descheckop) + Duel.RegisterEffect(ge1,0) + end) + --When a monster effect is activated, except in the hand (Quick Effect): You can return 1 other Thunder monster you control to the hand; negate the activation, and if you do, destroy the activating monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.negcon) + e2:SetCost(s.negcost) + e2:SetTarget(s.negtg) + e2:SetOperation(s.negop) + c:RegisterEffect(e2) +end +s.listed_series={SET_BLITZCLIQUE} +function s.descheckop(e,tp,eg,ep,ev,re,r,rp) + if not re then return end + local rc=re:GetHandler() + if rc and rc:IsSetCard(SET_BLITZCLIQUE) then + Duel.RegisterFlagEffect(rp,id,RESET_PHASE|PHASE_END,0,1) + end +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_THUNDER) 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) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_EITHER,LOCATION_ONFIELD) +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 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,math.min(ft,3),nil,e,tp) + if #g>0 then + local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + if ct>0 then + local fg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) + if #fg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local dg=fg:Select(tp,1,ct,nil) + if #dg>0 then + Duel.HintSelection(dg) + Duel.BreakEffect() + Duel.Destroy(dg,REASON_EFFECT) + end + end + end + end + end + --You cannot Special Summon Effect Monsters for the rest of this turn, except from the hand + 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:IsEffectMonster() or c:IsOriginalType(TYPE_EFFECT)) and not c:IsLocation(LOCATION_HAND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) + and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)~=LOCATION_HAND +end +function s.negcostfilter(c) + return c:IsRace(RACE_THUNDER) and c:IsFaceup() and c:IsAbleToHandAsCost() +end +function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.negcostfilter,tp,LOCATION_MZONE,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectMatchingCard(tp,s.negcostfilter,tp,LOCATION_MZONE,0,1,1,c) + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,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/c86132414.lua b/official/c86132414.lua new file mode 100644 index 0000000000..21768ed66a --- /dev/null +++ b/official/c86132414.lua @@ -0,0 +1,101 @@ +--三幻魔の神淵 +--Divine Abyss of the Sacred Beast +--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 send 3 face-up "Divine Abyss of the Sacred Beast" you control to the GY, including this card, then target 1 face-up monster your opponent controls; change it to face-down Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_SZONE) + e1:SetCost(s.poscost) + e1:SetTarget(s.postg) + e1:SetOperation(s.posop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --During the Main Phase: You can place 2 "Divine Abyss of the Sacred Beast" from your hand, Deck, and/or GY face-up on your field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,0}) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetTarget(s.pltg) + e2:SetOperation(s.plop) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + c:RegisterEffect(e2) + --During your opponent's End Phase, if this card is in your GY: You can place it on the bottom of the Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TODECK) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(function(e,tp) return Duel.IsEndPhase(1-tp) end) + e3:SetTarget(s.tdtg) + e3:SetOperation(s.tdop) + e3:SetHintTiming(0,TIMING_END_PHASE) + c:RegisterEffect(e3) +end +s.listed_names={id} +function s.poscostfilter(c) + return c:IsCode(id) and c:IsAbleToGraveAsCost() and c:IsFaceup() +end +function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToGraveAsCost() and c:IsStatus(STATUS_EFFECT_ENABLED) + and Duel.IsExistingMatchingCard(s.poscostfilter,tp,LOCATION_ONFIELD,0,2,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.poscostfilter,tp,LOCATION_ONFIELD,0,2,2,c) + Duel.SendtoGrave(g+c,REASON_COST) +end +function s.postg(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:IsCanTurnSet() end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,tp,POS_FACEDOWN_DEFENSE) +end +function s.posop(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.selfplfilter(c,tp) + return c:IsCode(id) and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=2 + and Duel.IsExistingMatchingCard(s.selfplfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,nil,tp) end +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)<2 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.selfplfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,2,2,nil,tp) + if #g==2 then + Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) + Duel.MoveToField(g:GetNext(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToDeck() end + Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c86319972.lua b/official/c86319972.lua new file mode 100644 index 0000000000..0214df292c --- /dev/null +++ b/official/c86319972.lua @@ -0,0 +1,88 @@ +--魔法名-「新しき世界の始まり」 +--Magical Name - "Rosa Mundi" +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Banish 1 "Aleister" monster or 1 Fusion Monster from your GY; Special Summon 1 "Invoked" monster from your Extra Deck, ignoring its Summoning conditions, but banish it during the End Phase + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(s.extraspcost) + e1:SetTarget(s.extrasptg) + e1:SetOperation(s.extraspop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --If a monster(s) is banished face-up, while this card is in your GY: You can banish this card, then target 1 of your banished "Invoked" monsters; Special Summon it + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET,EFFECT,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_REMOVE) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.banspcon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.bansptg) + e2:SetOperation(s.banspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ALEISTER,SET_INVOKED} +function s.extraspcostfilter(c,e,tp) + return (c:IsSetCard(SET_ALEISTER) or c:IsFusionMonster()) and c:IsAbleToRemoveAsCost() and c:IsMonster() and aux.SpElimFilter(c,true) + and Duel.IsExistingMatchingCard(s.extraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) +end +function s.extraspfilter(c,e,tp,rc) + return c:IsSetCard(SET_INVOKED) and Duel.GetLocationCountFromEx(tp,tp,rc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.extraspcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + if chk==0 then return Duel.IsExistingMatchingCard(s.extraspcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.extraspcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.Remove(g,nil,REASON_COST) +end +function s.extrasptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local cost_chk=e:GetLabel()==-100 + e:SetLabel(0) + return cost_chk or Duel.IsExistingMatchingCard(s.extraspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE) +end +function s.extraspop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.extraspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,true,false,POS_FACEUP)>0 then + --Banish it during the End Phase + aux.DelayedOperation(sc,PHASE_END,id,e,tp,function(ag) Duel.Remove(ag,POS_FACEUP,REASON_EFFECT) end,nil,0,0,aux.Stringid(id,2)) + end +end +function s.banspconfilter(c) + return c:IsMonster() and c:IsFaceup() and c:IsLocation(LOCATION_REMOVED) + and not c:IsPreviousLocation(LOCATION_SZONE) +end +function s.banspcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.banspconfilter,1,nil) +end +function s.banspfilter(c,e,tp) + return c:IsSetCard(SET_INVOKED) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.bansptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.banspfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.banspfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.banspfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.banspop(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/official/c96345184.lua b/official/c96345184.lua new file mode 100644 index 0000000000..0413793407 --- /dev/null +++ b/official/c96345184.lua @@ -0,0 +1,93 @@ +--無窮の三幻魔-幻魔皇ラビエル +--Raviel, Lord of Phantasms - Sacred Beast of Endless Eternity +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Must be Special Summoned with a "Sacred Beast" card + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_CONDITION) + e0:SetValue(function(e,sum_eff) return sum_eff:GetHandler():IsSetCard(SET_SACRED_BEAST) end) + c:RegisterEffect(e0) + --You can reveal this card in your hand; add 1 "Sacred Beast" monster from your Deck to your hand, except "Raviel, Lord of Phantasms - Sacred Beast of Endless Eternity", 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) + --Once per turn (Quick Effect): You can Tribute 2 other "Sacred Beast" monsters; destroy as many monsters your opponent controls as possible, and if you do, this card gains 1000 ATK for each card destroyed by this effect + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1) + e2:SetCost(s.descost) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_SACRED_BEAST} +function s.thfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) and c:IsMonster() 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_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 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.descostfilter(c) + return c:IsSetCard(SET_SACRED_BEAST) +end +function s.descostchk(sg,tp,exg) + return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,sg) +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.descostfilter,2,false,s.descostchk,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local g=Duel.SelectReleaseGroupCost(tp,s.descostfilter,2,2,false,s.descostchk,c) + Duel.Release(g,REASON_COST) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),0,tp,#g*1000) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) + if #g==0 then return end + local ct=Duel.Destroy(g,REASON_EFFECT) + if ct==0 then return end + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + --This card gains 1000 ATK for each card destroyed by this effect + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(ct*1000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c97254001.lua b/official/c97254001.lua new file mode 100644 index 0000000000..d972072128 --- /dev/null +++ b/official/c97254001.lua @@ -0,0 +1,112 @@ +--夏 +--Summer +local s,id=GetID() +local COUNTER_SEASON=0x214 +local CARD_SPRING=60600821 +function s.initial_effect(c) + c:EnableCounterPermit(COUNTER_SEASON) + --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Once per turn: You can place Season Counters on this card equal to the number of your opponent's unused Main Monster Zones + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_COUNTER) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_FZONE) + e1:SetCountLimit(1) + e1:SetTarget(s.countertg) + e1:SetOperation(s.counterop) + c:RegisterEffect(e1) + --Once per turn, when your monster declares an attack: You can inflict 400 damage to your opponent for each Season Counter on this card, and for each "Spring" in your GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EVENT_ATTACK_ANNOUNCE) + e2:SetRange(LOCATION_FZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(tp) end) + e2:SetTarget(s.damtg) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) + --Once per turn, during your opponent's End Phase: You can take 1 Field Spell from your hand or Deck that you can place a Season Counter on, and place it face-up on your field (but neither player can activate its effects this turn), and if you do, place all Season Counters on this card on that card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_COUNTER) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_PHASE+PHASE_END) + e3:SetRange(LOCATION_FZONE) + e3:SetCountLimit(1) + e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e3:SetTarget(s.pltg) + e3:SetOperation(s.plop) + c:RegisterEffect(e3) +end +s.counter_place_list={COUNTER_SEASON} +s.listed_names={CARD_SPRING} +function s.countertg(e,tp,eg,ep,ev,re,r,rp,chk) + local zones_count=Duel.GetLocationCount(1-tp,LOCATION_MZONE) + if chk==0 then return zones_count>0 end + Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,zones_count,tp,COUNTER_SEASON) +end +function s.counterop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local zones_count=Duel.GetLocationCount(1-tp,LOCATION_MZONE) + if c:IsRelateToEffect(e) and zones_count>0 then + c:AddCounter(COUNTER_SEASON,zones_count) + end +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + local season_counter_count=e:GetHandler():GetCounter(COUNTER_SEASON) + local spring_count=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,CARD_SPRING) + local total_damage=400*(season_counter_count+spring_count) + if chk==0 then return total_damage>0 end + Duel.SetTargetPlayer(1-tp) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,total_damage) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local player=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) + local season_counter_count=c:IsRelateToEffect(e) and c:GetCounter(COUNTER_SEASON) or 0 + local spring_count=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,CARD_SPRING) + local total_damage=400*(season_counter_count+spring_count) + if total_damage>0 then + Duel.Damage(player,total_damage,REASON_EFFECT) + end +end +function s.plfilter(c) + return c:IsFieldSpell() and c:IsCanAddCounter(COUNTER_SEASON,1,false,LOCATION_ONFIELD) and not c:IsForbidden() +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler():GetCounter(COUNTER_SEASON),tp,COUNTER_SEASON) +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil):GetFirst() + if not sc then return end + local c=e:GetHandler() + local ct=c:GetCounter(COUNTER_SEASON) + local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) + if fc then + Duel.SendtoGrave(fc,REASON_RULE) + Duel.BreakEffect() + end + if Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) then + --Neither player can activate its effects this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3302) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_TRIGGER) + e1:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e1) + if ct>0 then + sc:AddCounter(COUNTER_SEASON,ct) + end + end +end \ No newline at end of file diff --git a/official/c97462632.lua b/official/c97462632.lua new file mode 100644 index 0000000000..a1f2b7dd38 --- /dev/null +++ b/official/c97462632.lua @@ -0,0 +1,78 @@ +--グリフォー +--Gurifoh +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --(Quick Effect): You can discard this card, then activate 1 of these effects; + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + c:RegisterEffect(e1) + --For the Ritual Summon of exactly 1 Level 8 Ritual Monster with a card effect that requires use of monsters, this card can be used as the entire Tribute + Ritual.AddWholeLevelTribute(c,aux.FilterBoolFunction(Card.IsLevel,8)) +end +s.listed_names={CARD_LIGHT_AND_DARKNESS_RITUAL} +function s.setfilter(c) + return (c:IsQuickPlaySpell() or c:IsTrap()) and c:ListsCode(CARD_LIGHT_AND_DARKNESS_RITUAL) and c:IsSSetable() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=true + local b2=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 + e:SetCategory(0) + elseif op==2 then + e:SetCategory(CATEGORY_SET) + Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK) + 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 + --● The next battle or effect damage you take this turn will become 0 + 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_CHANGE_DAMAGE) + e1:SetTargetRange(1,0) + e1:SetValue(s.damval) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + elseif op==2 then + --● Set 1 Quick-Play Spell or Trap that mentions "Ritual of Light and Darkness" from your Deck. It can be activated this turn + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SSet(tp,sc)>0 then + local eff_code=sc:IsQuickPlaySpell() and EFFECT_QP_ACT_IN_SET_TURN or EFFECT_TRAP_ACT_IN_SET_TURN + --It can be activated this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,4)) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CLIENT_HINT) + e2:SetCode(eff_code) + e2:SetReset(RESETS_STANDARD_PHASE_END) + sc:RegisterEffect(e2) + end + end +end +function s.damval(e,re,val,r,rp,rc) + if r&(REASON_BATTLE|REASON_EFFECT)>0 then + Duel.Hint(HINT_CARD,0,id) + e:Reset() + return 0 + end + return val +end \ No newline at end of file diff --git a/official/c98476659.lua b/official/c98476659.lua new file mode 100644 index 0000000000..941f72b1fa --- /dev/null +++ b/official/c98476659.lua @@ -0,0 +1,51 @@ +--怠慢な壺 +--Pot of Procrastination +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Draw cards equal to the number of cards your opponent controls, then if you drew 2 or more, place the same number -1 from your hand on the bottom of the Deck in any order. For the rest of this turn after this card resolves, you cannot activate "Pot of Procrastination" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_names={id} +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local draw_count=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) + if chk==0 then return draw_count>0 and Duel.IsPlayerCanDraw(tp,draw_count) end + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,draw_count) + if draw_count>=2 then + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,draw_count-1,tp,LOCATION_HAND) + end + Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local draw_count=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) + if draw_count>0 and Duel.Draw(tp,draw_count,REASON_EFFECT)>0 and draw_count>=2 then + Duel.ShuffleHand(tp) + local return_count=draw_count-1 + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,return_count,return_count,nil) + if #g>0 then + Duel.BreakEffect() + if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and return_count>=2 then + Duel.SortDeckbottom(tp,tp,return_count) + end + end + end + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + --For the rest of this turn after this card resolves, you cannot activate "Pot of Procrastination" + local e1=Effect.CreateEffect(e:GetHandler()) + 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(function(e,re) return re:GetHandler():IsCode(id) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/official/c98684220.lua b/official/c98684220.lua new file mode 100644 index 0000000000..5fa00010f0 --- /dev/null +++ b/official/c98684220.lua @@ -0,0 +1,105 @@ +--超魔剣士ブラック・カオス +--Black Chaos the Ultimate Magical Swordsman +--Scripted by Eerie Code +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeSpecialSummoned() + --Must be Special Summoned (from your hand) by shuffling 1 Spellcaster or Warrior Ritual Monster from your hand or GY into the Deck + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e0:SetCondition(s.spcon) + e0:SetTarget(s.sptg) + e0:SetOperation(s.spop) + c:RegisterEffect(e0) + --You can discard this card; place 1 Continuous Trap that mentions "Ritual of Light and Darkness" from your Deck or GY, face-up on your field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCost(Cost.SelfDiscard) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --Unaffected by your opponent's activated effects while you have a Ritual Spell in your GY + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_IMMUNE_EFFECT) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e) return Duel.IsExistingMatchingCard(Card.IsRitualSpell,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) end) + e2:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() end) + c:RegisterEffect(e2) + --Once per turn: You can banish 2 cards your opponent controls + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_REMOVE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1) + e3:SetTarget(s.rmtg) + e3:SetOperation(s.rmop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_LIGHT_AND_DARKNESS_RITUAL} +function s.spconfilter(c) + return c:IsRace(RACE_SPELLCASTER|RACE_WARRIOR) and c:IsRitualMonster() and c:IsAbleToDeckAsCost() +end +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,nil) + local sg=aux.SelectUnselectGroup(g,e,tp,1,1,nil,1,tp,HINTMSG_TODECK,nil,nil,true) + if #sg>0 then + e:SetLabelObject(sg) + return true + end + return false +end +function s.spop(e,tp,eg,ep,ev,re,r,rp,c) + local g=e:GetLabelObject() + if g then + local sc=g:GetFirst() + if sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + else + Duel.HintSelection(sc) + end + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) + end +end +function s.plfilter(c,tp) + return c:IsContinuousTrap() and c:ListsCode(CARD_LIGHT_AND_DARKNESS_RITUAL) and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,tp) end + Duel.SetPossibleOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) +end +function s.plop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end + 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,tp):GetFirst() + if sc then + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,2,nil) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,1-tp,LOCATION_ONFIELD) +end +function s.rmop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,2,2,nil) + if #g==2 then + Duel.HintSelection(g) + Duel.Remove(g,POS_FACEUP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c99199231.lua b/official/c99199231.lua new file mode 100644 index 0000000000..4f09c21429 --- /dev/null +++ b/official/c99199231.lua @@ -0,0 +1,87 @@ +--S-Force オリジン +--S-Force Origin +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "S-Force" monster from your hand, GY, or banishment, 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_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --If another card(s) is banished while this card is in your GY: You can banish it; take 2 "S-Force" cards from your Deck, except "S-Force Origin", banish 1 of them, and send the other to the GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e2:SetCode(EVENT_REMOVE) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) end) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.bantgtg) + e2:SetOperation(s.bantgop) + c:RegisterEffect(e2) +end +s.listed_series={SET_S_FORCE} +s.listed_names={id} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_S_FORCE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and (c:IsLocation(LOCATION_HAND) 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_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) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE) +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|LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then + --Banish it when 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) + sc:RegisterEffect(e1,true) + end +end +function s.bantgfilter(c) + return c:IsSetCard(SET_S_FORCE) and (c:IsAbleToRemove() or c:IsAbleToGrave()) and not c:IsCode(id) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsAbleToRemove,1,nil) and sg:IsExists(Card.IsAbleToGrave,1,nil) +end +function s.bantgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.bantgfilter,tp,LOCATION_DECK,0,nil) + return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) + end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +end +function s.banfilter(c,sg) + return c:IsAbleToRemove() and sg:IsExists(Card.IsAbleToGrave,1,c) +end +function s.bantgop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.bantgfilter,tp,LOCATION_DECK,0,nil) + if #g<2 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,aux.Stringid(id,2)) + if #sg~=2 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local bg=sg:FilterSelect(tp,s.banfilter,1,1,nil,sg) + if #bg>0 then + Duel.Remove(bg,POS_FACEUP,REASON_EFFECT) + Duel.SendtoGrave(sg-bg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/official/c99311889.lua b/official/c99311889.lua new file mode 100644 index 0000000000..ab62b39452 --- /dev/null +++ b/official/c99311889.lua @@ -0,0 +1,67 @@ +--絶境なる獄神域-ヴィライア +--Dead-End Power Patron Realm - Viraia +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Show 1 "Nerva the Power Patron of Creation", 1 "Jupiter the Power Patron of Destruction", and 1 "Junora the Power Patron of Tuning" from your Extra Deck, face-up field, and/or GY, and if you do, your opponent cannot activate cards or effects in response the activation of your "Power Patron" monsters' effects this turn + 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,0}) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE) + c:RegisterEffect(e1) + --If you would banish the top card(s) of your Deck to activate the effect of a "Power Patron" monster you control, you can banish this card from your GY instead + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EFFECT_COST_REPLACE) + e2:SetRange(LOCATION_GRAVE) + e2:SetTargetRange(1,0) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():IsAbleToRemoveAsCost() end) + e2:SetValue(s.repval) + e2:SetOperation(function(base) Duel.Remove(base:GetHandler(),POS_FACEUP,REASON_COST) end) + c:RegisterEffect(e2) +end +s.listed_names={53589300,68231287,5914858} --"Nerva the Power Patron of Creation", "Jupiter the Power Patron of Destruction", "Junora the Power Patron of Tuning" +s.listed_series={SET_POWER_PATRON} +function s.showfilter(c) + return c:IsCode(53589300,68231287,5914858) and (c:IsFaceup() or not c:IsOnField()) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.showfilter,tp,LOCATION_EXTRA|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) + return g:GetClassCount(Card.GetCode)>=3 + end +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.showfilter,tp,LOCATION_EXTRA|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) + if #g>=3 then + local rg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_CONFIRM) + local fieldgraveg,extrag=rg:Split(Card.IsLocation,nil,LOCATION_ONFIELD|LOCATION_GRAVE) + if #fieldgraveg>0 then Duel.HintSelection(fieldgraveg) end + if #extrag>0 then Duel.ConfirmCards(1-tp,extrag) end + if rg:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) then Duel.ShuffleExtra(tp) end + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1)) + --Your opponent cannot activate cards or effects in response the activation of your "Power Patron" monsters' effects this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAINING) + e1:SetOperation(s.inactop) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end +function s.inactop(e,tp,eg,ep,ev,re,r,rp) + if ep==tp and Chain.IsType(ev,TYPE_MONSTER) and Chain.IsSetcode(ev,SET_POWER_PATRON) then + Duel.SetChainLimit(function(e,rp,tp) return rp==tp end) + end +end +function s.repval(base,extracon,e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + return c:IsSetCard(SET_POWER_PATRON) and c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) +end \ No newline at end of file