From 07d0540a8dda386b96a5d5b832f4028a2b9277da Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 27 Jun 2026 18:32:46 +0300 Subject: [PATCH 1/4] Delete pre-release directory --- 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/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 ---------------------- 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 - 118 files changed, 10085 deletions(-) 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/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/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/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/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/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/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/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 bded1877605e6f36285ac10de3fdfe7bd83cba80 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 27 Jun 2026 18:43:55 +0300 Subject: [PATCH 2/4] Add files via upload --- 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/c100457102.lua | 95 ++++++++++++++++++++++++ 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 ++++++++++++++++++++++ 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 + 86 files changed, 7450 insertions(+) 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/c100457102.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 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/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/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/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 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 51de1687de8f3b1ce3f02de7b9b0a8a390c4ae08 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 27 Jun 2026 18:44:43 +0300 Subject: [PATCH 3/4] Add files via upload --- 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 +++++++++++++++++++++++++++++++++++ 16 files changed, 1317 insertions(+) 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 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 From 47944fc94cfc89bd504a9d3979eb80d0c8f6b4fa Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 27 Jun 2026 18:45:22 +0300 Subject: [PATCH 4/4] Add files via upload --- card_counter_constants.lua | 2 +- official/c14556954.lua | 72 +++++++++++++++++++++++ official/c1463589.lua | 52 +++++++++++++++++ official/c15778492.lua | 90 ++++++++++++++++++++++++++++ official/c1595137.lua | 86 +++++++++++++++++++++++++++ official/c18795635.lua | 6 +- official/c19144622.lua | 6 +- official/c2618725.lua | 74 +++++++++++++++++++++++ official/c3434362.lua | 81 ++++++++++++++++++++++++++ official/c38984832.lua | 77 ++++++++++++++++++++++++ official/c39706423.lua | 89 ++++++++++++++++++++++++++++ official/c40041559.lua | 101 ++++++++++++++++++++++++++++++++ official/c4026187.lua | 4 +- official/c41763141.lua | 65 +++++++++++++++++++++ official/c49828011.lua | 90 ++++++++++++++++++++++++++++ official/c56725612.lua | 6 +- official/c74378580.lua | 73 +++++++++++++++++++++++ official/c75191028.lua | 116 +++++++++++++++++++++++++++++++++++++ official/c76213610.lua | 78 +++++++++++++++++++++++++ official/c77157846.lua | 97 +++++++++++++++++++++++++++++++ official/c77435268.lua | 77 ++++++++++++++++++++++++ official/c78021082.lua | 8 +-- official/c82119326.lua | 10 ++-- official/c82706696.lua | 6 +- 24 files changed, 1342 insertions(+), 24 deletions(-) create mode 100644 official/c14556954.lua create mode 100644 official/c1463589.lua create mode 100644 official/c15778492.lua create mode 100644 official/c1595137.lua create mode 100644 official/c2618725.lua create mode 100644 official/c3434362.lua create mode 100644 official/c38984832.lua create mode 100644 official/c39706423.lua create mode 100644 official/c40041559.lua create mode 100644 official/c41763141.lua create mode 100644 official/c49828011.lua create mode 100644 official/c74378580.lua create mode 100644 official/c75191028.lua create mode 100644 official/c76213610.lua create mode 100644 official/c77157846.lua create mode 100644 official/c77435268.lua diff --git a/card_counter_constants.lua b/card_counter_constants.lua index 8763607e1c..83ae96d9d3 100644 --- a/card_counter_constants.lua +++ b/card_counter_constants.lua @@ -38,7 +38,7 @@ CARD_DREAMING_NEMLERIA = 70155677 CARD_EHERO_BLAZEMAN = 63060238 CARD_EVIL_EYE_SELENE = 44133040 CARD_EXCHANGE_SPIRIT = 17484499 -CARD_FAIRY_PRINCE = 10000120 +CARD_PRINCE_OF_FAIRIES = 10000120 CARD_FAIRY_TALE_PROLOGUE = 43236494 CARD_FLAME_SWORDSMAN = 45231177 CARD_FIRE_FIST_EAGLE = 46241344 diff --git a/official/c14556954.lua b/official/c14556954.lua new file mode 100644 index 0000000000..515f1efc0d --- /dev/null +++ b/official/c14556954.lua @@ -0,0 +1,72 @@ +--豪回遊鯨VIPホエール +--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/official/c1463589.lua b/official/c1463589.lua new file mode 100644 index 0000000000..6218cc5c91 --- /dev/null +++ b/official/c1463589.lua @@ -0,0 +1,52 @@ +--A-GMX最終検証 +--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+1595137,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/official/c15778492.lua b/official/c15778492.lua new file mode 100644 index 0000000000..b9882474b1 --- /dev/null +++ b/official/c15778492.lua @@ -0,0 +1,90 @@ +--ゲーミング・ゲーマーGG +--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/official/c1595137.lua b/official/c1595137.lua new file mode 100644 index 0000000000..1eb9a3d47c --- /dev/null +++ b/official/c1595137.lua @@ -0,0 +1,86 @@ +--暁世竜ダニアン +--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+1595137) + 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+1) 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+1,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 \ No newline at end of file diff --git a/official/c18795635.lua b/official/c18795635.lua index 1b8c9e1f8c..7babe78510 100644 --- a/official/c18795635.lua +++ b/official/c18795635.lua @@ -1,4 +1,4 @@ ---JP name +--第55次GMX応用試験 --GMX Applied Experiment #55 --scripted by pyrQ local s,id=GetID() @@ -31,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #gmx_g==0 or #dino_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) + Duel.RaiseEvent(excav_g,EVENT_CUSTOM+1595137,e,REASON_EFFECT,tp,tp,deck_count) Duel.SetLP(tp,Duel.GetLP(tp)-deck_count*400) else local gmx_c=gmx_g:GetMaxGroup(Card.GetSequence):GetFirst() @@ -39,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local excav_count=deck_count-math.min(gmx_c:GetSequence(),dino_c:GetSequence()) 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) + Duel.RaiseEvent(excav_g,EVENT_CUSTOM+1595137,e,REASON_EFFECT,tp,tp,excav_count) Duel.SetLP(tp,Duel.GetLP(tp)-excav_count*400) local excav_monsters=Duel.GetDecktopGroup(tp,excav_count):Match(Card.IsMonster,nil) local fusion_params={ diff --git a/official/c19144622.lua b/official/c19144622.lua index 212144217c..d296a243bf 100644 --- a/official/c19144622.lua +++ b/official/c19144622.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_FAIRY_TAIL} -s.listed_names={91957038,CARD_FAIRY_PRINCE} --"Fairy Tail Tales" +s.listed_names={91957038,CARD_PRINCE_OF_FAIRIES} --"Fairy Tale Tails" function s.spconfilter(c) return c:IsRace(RACE_SPELLCASTER) and c:IsBaseAttack(1850) and c:IsFaceup() end @@ -85,7 +85,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.namechangefilter(c) - return c:IsType(TYPE_EFFECT) and c:IsFaceup() and not c:IsCode(CARD_FAIRY_PRINCE) + return c:IsType(TYPE_EFFECT) and c:IsFaceup() and not c:IsCode(CARD_PRINCE_OF_FAIRIES) end function s.namechangetg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.namechangefilter,tp,0,LOCATION_MZONE,1,nil) end @@ -100,7 +100,7 @@ function s.namechangeop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(CARD_FAIRY_PRINCE) + e1:SetValue(CARD_PRINCE_OF_FAIRIES) e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) end diff --git a/official/c2618725.lua b/official/c2618725.lua new file mode 100644 index 0000000000..45081e84c7 --- /dev/null +++ b/official/c2618725.lua @@ -0,0 +1,74 @@ +--GMX同絆者セランディア +--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/official/c3434362.lua b/official/c3434362.lua new file mode 100644 index 0000000000..5762abb1a2 --- /dev/null +++ b/official/c3434362.lua @@ -0,0 +1,81 @@ +--ラスティン・マンモス +--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/official/c38984832.lua b/official/c38984832.lua new file mode 100644 index 0000000000..9f16f59e26 --- /dev/null +++ b/official/c38984832.lua @@ -0,0 +1,77 @@ +--第55次GMX試験報告 +--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+1595137,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+1595137,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/official/c39706423.lua b/official/c39706423.lua new file mode 100644 index 0000000000..4b38c46aee --- /dev/null +++ b/official/c39706423.lua @@ -0,0 +1,89 @@ +--GMX鎮圧部隊アプト +--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+1595137,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+1595137,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/official/c40041559.lua b/official/c40041559.lua new file mode 100644 index 0000000000..dae4053bad --- /dev/null +++ b/official/c40041559.lua @@ -0,0 +1,101 @@ +--指環の精霊ジーニャ +--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/official/c4026187.lua b/official/c4026187.lua index 98440fdf4e..613eb77ad9 100644 --- a/official/c4026187.lua +++ b/official/c4026187.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) local e2b=Effect.CreateEffect(c) e2b:SetType(EFFECT_TYPE_SINGLE) e2b:SetCode(EFFECT_MATERIAL_CHECK) - e2b:SetValue(function(e,c) e2a:SetLabel(c:GetMaterial():IsExists(Card.IsCode,1,nil,CARD_FAIRY_PRINCE) and 1 or 0) end) + e2b:SetValue(function(e,c) e2a:SetLabel(c:GetMaterial():IsExists(Card.IsCode,1,nil,CARD_PRINCE_OF_FAIRIES) and 1 or 0) end) c:RegisterEffect(e2b) --Negate the activation of an opponent's card or effect, and if you do, destroy that card local e3=Effect.CreateEffect(c) @@ -48,7 +48,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_FAIRY_TAIL} -s.listed_names={CARD_FAIRY_PRINCE} +s.listed_names={CARD_PRINCE_OF_FAIRIES} s.material_setcode={SET_FAIRY_TAIL} function s.matfilter(c,fc,sumtype,tp) return c:IsAttribute(ATTRIBUTE_LIGHT,fc,sumtype,tp) and c:IsSetCard(SET_FAIRY_TAIL,fc,sumtype,tp) diff --git a/official/c41763141.lua b/official/c41763141.lua new file mode 100644 index 0000000000..1aa7341393 --- /dev/null +++ b/official/c41763141.lua @@ -0,0 +1,65 @@ +--蜃欺龍 +--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/official/c49828011.lua b/official/c49828011.lua new file mode 100644 index 0000000000..46b0c3f4c2 --- /dev/null +++ b/official/c49828011.lua @@ -0,0 +1,90 @@ +--祭司 レヴァリー +--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/official/c56725612.lua b/official/c56725612.lua index c8481f8a3d..dba83238f4 100644 --- a/official/c56725612.lua +++ b/official/c56725612.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_FAIRY_TAIL} -s.listed_names={91957038,CARD_FAIRY_PRINCE} --"Fairy Tail Tales" +s.listed_names={91957038,CARD_PRINCE_OF_FAIRIES} --"Fairy Tale Tails" function s.thfilter(c) return ((c:IsSetCard(SET_FAIRY_TAIL) and c:IsMonster()) or c:IsCode(91957038)) and c:IsAbleToHand() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) @@ -52,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.disfilter(c) - return c:IsType(TYPE_EFFECT) and c:IsFaceup() and (c:IsNegatableMonster() or not c:IsCode(CARD_FAIRY_PRINCE)) + return c:IsType(TYPE_EFFECT) and c:IsFaceup() and (c:IsNegatableMonster() or not c:IsCode(CARD_PRINCE_OF_FAIRIES)) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end @@ -73,7 +73,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(CARD_FAIRY_PRINCE) + e1:SetValue(CARD_PRINCE_OF_FAIRIES) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end diff --git a/official/c74378580.lua b/official/c74378580.lua new file mode 100644 index 0000000000..f26c2a2655 --- /dev/null +++ b/official/c74378580.lua @@ -0,0 +1,73 @@ +--旧GMX第5研究所 +--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/official/c75191028.lua b/official/c75191028.lua new file mode 100644 index 0000000000..30fb821d76 --- /dev/null +++ b/official/c75191028.lua @@ -0,0 +1,116 @@ +--GMX-COMPREX +--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+1595137) + 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/official/c76213610.lua b/official/c76213610.lua new file mode 100644 index 0000000000..7c05646d43 --- /dev/null +++ b/official/c76213610.lua @@ -0,0 +1,78 @@ +--死宰 サムエル +--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/official/c77157846.lua b/official/c77157846.lua new file mode 100644 index 0000000000..84074395bc --- /dev/null +++ b/official/c77157846.lua @@ -0,0 +1,97 @@ +--暗翳の信仰者 +--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/official/c77435268.lua b/official/c77435268.lua new file mode 100644 index 0000000000..9cb7b99823 --- /dev/null +++ b/official/c77435268.lua @@ -0,0 +1,77 @@ +--チェツカー +--Checkker +--Scripted by The Razgriz +local s,id=GetID() +local TOKEN_IRON_RUBBLE=id+1 +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/official/c78021082.lua b/official/c78021082.lua index 775975c06f..bb2b52f3be 100644 --- a/official/c78021082.lua +++ b/official/c78021082.lua @@ -38,12 +38,12 @@ function s.initial_effect(c) e3:SetCode(EFFECT_CHANGE_RACE) e3:SetRange(LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(function(e,c) return c:IsCode(CARD_FAIRY_PRINCE) end) + e3:SetTarget(function(e,c) return c:IsCode(CARD_PRINCE_OF_FAIRIES) end) e3:SetValue(RACE_SPELLCASTER) c:RegisterEffect(e3) end s.listed_series={SET_FAIRY_TAIL} -s.listed_names={CARD_FAIRY_PRINCE} +s.listed_names={CARD_PRINCE_OF_FAIRIES} s.material_setcode={SET_FAIRY_TAIL} function s.spfilter(c,e,tp) return c:IsSetCard(SET_FAIRY_TAIL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) @@ -68,7 +68,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.disconfilter,1,nil,tp) end function s.disfilter(c) - return c:IsType(TYPE_EFFECT) and c:IsFaceup() and (c:IsNegatableMonster() or not c:IsCode(CARD_FAIRY_PRINCE)) + return c:IsType(TYPE_EFFECT) and c:IsFaceup() and (c:IsNegatableMonster() or not c:IsCode(CARD_PRINCE_OF_FAIRIES)) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end @@ -88,7 +88,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetValue(CARD_FAIRY_PRINCE) + e1:SetValue(CARD_PRINCE_OF_FAIRIES) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end diff --git a/official/c82119326.lua b/official/c82119326.lua index 87d24d4647..08bfa2b7ed 100644 --- a/official/c82119326.lua +++ b/official/c82119326.lua @@ -12,10 +12,10 @@ function s.initial_effect(c) c:RegisterEffect(e1) --Fusion Summon 1 Spellcaster Fusion Monster from your Extra Deck, using monsters from your hand or field, when you do, you can also use any "Fairy Prince" your opponent controls local fusion_params={ - handler=c, - fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER), - extrafil=function(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.FaceupFilter(Card.IsCode,CARD_FAIRY_PRINCE)),tp,0,LOCATION_ONFIELD,nil) end - } + handler=c, + fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER), + extrafil=function(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.FaceupFilter(Card.IsCode,CARD_PRINCE_OF_FAIRIES)),tp,0,LOCATION_ONFIELD,nil) end + } local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) @@ -37,7 +37,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_FAIRY_TAIL} -s.listed_names={CARD_FAIRY_PRINCE} +s.listed_names={CARD_PRINCE_OF_FAIRIES} function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FAIRY_TAIL),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end diff --git a/official/c82706696.lua b/official/c82706696.lua index bf0199adff..628dc02105 100644 --- a/official/c82706696.lua +++ b/official/c82706696.lua @@ -1,4 +1,4 @@ ---JP name +--GMX-VELOX --GMX - VELOX --scripted by pyrQ local s,id=GetID() @@ -78,7 +78,7 @@ function s.excavop(e,tp,eg,ep,ev,re,r,rp) 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) + Duel.RaiseEvent(excav_g,EVENT_CUSTOM+1595137,e,REASON_EFFECT,tp,tp,deck_count) Duel.SetLP(tp,Duel.GetLP(tp)-deck_count*400) else local sc=g:GetMaxGroup(Card.GetSequence):GetFirst() @@ -86,7 +86,7 @@ function s.excavop(e,tp,eg,ep,ev,re,r,rp) 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) + Duel.RaiseEvent(excav_g,EVENT_CUSTOM+1595137,e,REASON_EFFECT,tp,tp,excav_count) Duel.SetLP(tp,Duel.GetLP(tp)-excav_count*400) aux.ToHandOrElse(sc,tp, function()