From 0bb4273643220dd8ea59b7dfb66f208d76a913ee Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 29 Jun 2025 13:22:53 +0300 Subject: [PATCH 1/2] Delete pre-release directory --- pre-release/c100200273.lua | 94 -------------------- pre-release/c100201001.lua | 42 --------- pre-release/c100201002.lua | 31 ------- pre-release/c100201003.lua | 56 ------------ pre-release/c100443001.lua | 78 ----------------- pre-release/c100443003.lua | 80 ----------------- pre-release/c100443005.lua | 39 --------- pre-release/c100443007.lua | 91 -------------------- pre-release/c100443010.lua | 67 --------------- pre-release/c100443101.lua | 101 ---------------------- pre-release/c100443102.lua | 63 -------------- pre-release/c100443103.lua | 66 -------------- pre-release/c100443104.lua | 76 ----------------- pre-release/c100443105.lua | 37 -------- pre-release/c100445001.lua | 107 ----------------------- pre-release/c100445002.lua | 86 ------------------- pre-release/c100445003.lua | 60 ------------- pre-release/c100445024.lua | 69 --------------- pre-release/c100445025.lua | 91 -------------------- pre-release/c100445026.lua | 76 ----------------- pre-release/c100445057.lua | 106 ----------------------- pre-release/c100445058.lua | 63 -------------- pre-release/c100445059.lua | 85 ------------------ pre-release/c101301081.lua | 78 ----------------- pre-release/c101301082.lua | 86 ------------------- pre-release/c101301083.lua | 48 ----------- pre-release/c101301084.lua | 64 -------------- pre-release/c101301085.lua | 93 -------------------- pre-release/c101301086.lua | 85 ------------------ pre-release/c101301087.lua | 98 --------------------- pre-release/c101301088.lua | 81 ------------------ pre-release/c101301089.lua | 72 ---------------- pre-release/c101301090.lua | 59 ------------- pre-release/c101301091.lua | 62 -------------- pre-release/c101301092.lua | 61 ------------- pre-release/c101301093.lua | 86 ------------------- pre-release/c101301094.lua | 69 --------------- pre-release/c101301095.lua | 83 ------------------ pre-release/c101301096.lua | 69 --------------- pre-release/c101302006.lua | 91 -------------------- pre-release/c101302012.lua | 70 --------------- pre-release/c101302013.lua | 54 ------------ pre-release/c101302014.lua | 54 ------------ pre-release/c101302015.lua | 89 ------------------- pre-release/c101302016.lua | 69 --------------- pre-release/c101302017.lua | 65 -------------- pre-release/c101302020.lua | 95 --------------------- pre-release/c101302021.lua | 120 -------------------------- pre-release/c101302033.lua | 65 -------------- pre-release/c101302034.lua | 85 ------------------ pre-release/c101302036.lua | 65 -------------- pre-release/c101302041.lua | 84 ------------------ pre-release/c101302050.lua | 74 ---------------- pre-release/c101302056.lua | 75 ---------------- pre-release/c101302061.lua | 84 ------------------ pre-release/c101302062.lua | 84 ------------------ pre-release/c101302063.lua | 97 --------------------- pre-release/c101302065.lua | 85 ------------------ pre-release/c101302066.lua | 103 ---------------------- pre-release/c101302076.lua | 122 -------------------------- pre-release/c101302101.lua | 78 ----------------- pre-release/c101302102.lua | 102 ---------------------- pre-release/c101302103.lua | 104 ---------------------- pre-release/c101302104.lua | 171 ------------------------------------- pre-release/c101302105.lua | 64 -------------- pre-release/c101302106.lua | 85 ------------------ pre-release/c101302107.lua | 70 --------------- pre-release/c101302108.lua | 81 ------------------ pre-release/c101302109.lua | 95 --------------------- 69 files changed, 5438 deletions(-) delete mode 100644 pre-release/c100200273.lua delete mode 100644 pre-release/c100201001.lua delete mode 100644 pre-release/c100201002.lua delete mode 100644 pre-release/c100201003.lua delete mode 100644 pre-release/c100443001.lua delete mode 100644 pre-release/c100443003.lua delete mode 100644 pre-release/c100443005.lua delete mode 100644 pre-release/c100443007.lua delete mode 100644 pre-release/c100443010.lua delete mode 100644 pre-release/c100443101.lua delete mode 100644 pre-release/c100443102.lua delete mode 100644 pre-release/c100443103.lua delete mode 100644 pre-release/c100443104.lua delete mode 100644 pre-release/c100443105.lua delete mode 100644 pre-release/c100445001.lua delete mode 100644 pre-release/c100445002.lua delete mode 100644 pre-release/c100445003.lua delete mode 100644 pre-release/c100445024.lua delete mode 100644 pre-release/c100445025.lua delete mode 100644 pre-release/c100445026.lua delete mode 100644 pre-release/c100445057.lua delete mode 100644 pre-release/c100445058.lua delete mode 100644 pre-release/c100445059.lua delete mode 100644 pre-release/c101301081.lua delete mode 100644 pre-release/c101301082.lua delete mode 100644 pre-release/c101301083.lua delete mode 100644 pre-release/c101301084.lua delete mode 100644 pre-release/c101301085.lua delete mode 100644 pre-release/c101301086.lua delete mode 100644 pre-release/c101301087.lua delete mode 100644 pre-release/c101301088.lua delete mode 100644 pre-release/c101301089.lua delete mode 100644 pre-release/c101301090.lua delete mode 100644 pre-release/c101301091.lua delete mode 100644 pre-release/c101301092.lua delete mode 100644 pre-release/c101301093.lua delete mode 100644 pre-release/c101301094.lua delete mode 100644 pre-release/c101301095.lua delete mode 100644 pre-release/c101301096.lua delete mode 100644 pre-release/c101302006.lua delete mode 100644 pre-release/c101302012.lua delete mode 100644 pre-release/c101302013.lua delete mode 100644 pre-release/c101302014.lua delete mode 100644 pre-release/c101302015.lua delete mode 100644 pre-release/c101302016.lua delete mode 100644 pre-release/c101302017.lua delete mode 100644 pre-release/c101302020.lua delete mode 100644 pre-release/c101302021.lua delete mode 100644 pre-release/c101302033.lua delete mode 100644 pre-release/c101302034.lua delete mode 100644 pre-release/c101302036.lua delete mode 100644 pre-release/c101302041.lua delete mode 100644 pre-release/c101302050.lua delete mode 100644 pre-release/c101302056.lua delete mode 100644 pre-release/c101302061.lua delete mode 100644 pre-release/c101302062.lua delete mode 100644 pre-release/c101302063.lua delete mode 100644 pre-release/c101302065.lua delete mode 100644 pre-release/c101302066.lua delete mode 100644 pre-release/c101302076.lua delete mode 100644 pre-release/c101302101.lua delete mode 100644 pre-release/c101302102.lua delete mode 100644 pre-release/c101302103.lua delete mode 100644 pre-release/c101302104.lua delete mode 100644 pre-release/c101302105.lua delete mode 100644 pre-release/c101302106.lua delete mode 100644 pre-release/c101302107.lua delete mode 100644 pre-release/c101302108.lua delete mode 100644 pre-release/c101302109.lua diff --git a/pre-release/c100200273.lua b/pre-release/c100200273.lua deleted file mode 100644 index 5ca130e032..0000000000 --- a/pre-release/c100200273.lua +++ /dev/null @@ -1,94 +0,0 @@ ---黒魔術の護符 ---Dark Magic Amulet ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --You can activate this card the turn it was Set by revealing 1 Spellcaster monster in your hand - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) - e0:SetValue(function(e) e:SetLabel(1) end) - e0:SetCondition(function(e) return Duel.IsExistingMatchingCard(s.discostfilter,e:GetHandlerPlayer(),LOCATION_HAND,0,1,nil) end) - c:RegisterEffect(e0) - --Negate a monster effect that is activated in response to the activation of a card that mentions "Dark Magician" or its effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DISABLE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(s.discon) - e1:SetCost(s.discost) - e1:SetTarget(s.distg) - e1:SetOperation(s.disop) - e1:SetLabelObject(e0) - c:RegisterEffect(e1) - --Set this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_LEAVE_GRAVE) - 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:SetCondition(s.setcon) - e2:SetCost(Cost.PayLP(2500)) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_DARK_MAGICIAN} -function s.discon(e,tp,eg,ep,ev,re,r,rp) - local chainlink=Duel.GetCurrentChain(true)-1 - if not (chainlink>0 and re:IsMonsterEffect() and Duel.IsChainDisablable(ev)) then return false end - local trig_eff=Duel.GetChainInfo(chainlink,CHAININFO_TRIGGERING_EFFECT) - return trig_eff and trig_eff:GetHandler():ListsCode(CARD_DARK_MAGICIAN) -end -function s.discostfilter(c) - return c:IsRace(RACE_SPELLCASTER) and not c:IsPublic() -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local label_obj=e:GetLabelObject() - if chk==0 then label_obj:SetLabel(0) return true end - if label_obj:GetLabel()>0 then - label_obj:SetLabel(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local g=Duel.SelectMatchingCard(tp,s.discostfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.ConfirmCards(1-tp,g) - Duel.ShuffleHand(tp) - end -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) - if Duel.NegateEffect(ev) then - local code1,code2=re:GetHandler():GetOriginalCodeRule() - --For the rest of this turn, the activated effects of monsters with the same original name are negated - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsMonsterEffect() and re:GetHandler():IsOriginalCodeRule(code1,code2) end) - e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.NegateEffect(ev) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function s.setconfilter(c,tp) - return c:IsCode(CARD_DARK_MAGICIAN) and c:IsSummonPlayer(tp) and c:IsFaceup() -end -function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.setconfilter,1,nil,tp) -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsSSetable() end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SSet(tp,c) - end -end \ No newline at end of file diff --git a/pre-release/c100201001.lua b/pre-release/c100201001.lua deleted file mode 100644 index 8ee5fa9d59..0000000000 --- a/pre-release/c100201001.lua +++ /dev/null @@ -1,42 +0,0 @@ ---契約を結びし竜の戦士 ---Dragonic Warrior -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Level 4 or lower Dragon monster from your hand or Deck, except "Dragonic Warrior", but its effects are negated - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={id} -function s.spcostfilter(c,e,tp) - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) -end -function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST|REASON_DISCARD,nil,e,tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() - if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - sc:NegateEffects(e:GetHandler()) - end - Duel.SpecialSummonComplete() -end diff --git a/pre-release/c100201002.lua b/pre-release/c100201002.lua deleted file mode 100644 index 9b0c446078..0000000000 --- a/pre-release/c100201002.lua +++ /dev/null @@ -1,31 +0,0 @@ ---アイン・ロイド ---Einroid -local s,id=GetID() -function s.initial_effect(c) - --Send 2 Level 4 or lower Machine monsters from your Deck 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_DESTROYED) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end) - e1:SetTarget(s.tgtg) - e1:SetOperation(s.tgop) - c:RegisterEffect(e1) -end -function s.tgfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave() -end -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,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,2,2,nil) - if #g==2 then - Duel.SendtoGrave(g,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100201003.lua b/pre-release/c100201003.lua deleted file mode 100644 index 35f72f4627..0000000000 --- a/pre-release/c100201003.lua +++ /dev/null @@ -1,56 +0,0 @@ ---妖魔ヌリカベ ---Nurikabe -local s,id=GetID() -function s.initial_effect(c) - --Special Summon both 1 other Zombie monster from your GY and this card, but their effects are negated, also banish them when they leave the field - 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_GRAVE) - e1:SetCountLimit(1,id) - e1:SetCondition(aux.exccon) - e1:SetCost(Cost.PayLP(1000)) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -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) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then - for sc in Group.FromCards(c,tc):Iter() do - if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - --Negate its effects - sc:NegateEffects(c) - --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) - sc:RegisterEffect(e1,true) - end - end - end - Duel.SpecialSummonComplete() -end \ No newline at end of file diff --git a/pre-release/c100443001.lua b/pre-release/c100443001.lua deleted file mode 100644 index 963cbfcef7..0000000000 --- a/pre-release/c100443001.lua +++ /dev/null @@ -1,78 +0,0 @@ ---恋する乙女 ---Maiden in Love ---scripted by Naim -local s,id=GetID() -local COUNTER_MAIDEN=0x1090 -function s.initial_effect(c) - --Monsters your opponent controls that can attack must attack this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetRange(LOCATION_MZONE) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) - e2:SetValue(function(e,c) return c==e:GetHandler() end) - c:RegisterEffect(e2) - --Cannot be destroyed by battle - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetValue(1) - c:RegisterEffect(e3) - --Activate 1 of these effects at the end of the Damage Step, if this card battled an opponent's monster - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_DAMAGE_STEP_END) - e4:SetCondition(s.effcon) - e4:SetTarget(s.efftg) - e4:SetOperation(s.effop) - c:RegisterEffect(e4) -end -function s.effcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:GetBattleTarget() and c:IsStatus(STATUS_OPPO_BATTLE) -end -function s.controlfilter(c) - return c:HasCounter(COUNTER_MAIDEN) and c:IsControlerCanBeChanged() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,COUNTER_MAIDEN,1) - local b2=Duel.IsExistingMatchingCard(s.controlfilter,tp,0,LOCATION_MZONE,1,nil) - local c=e:GetHandler() - if chk==0 then return c:IsLocation(LOCATION_MZONE) and c:IsRelateToBattle() and (b1 or b2) end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_COUNTER) - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,tp,COUNTER_MAIDEN) - elseif op==2 then - e:SetCategory(CATEGORY_CONTROL) - local g=Duel.GetMatchingGroup(s.controlfilter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Place 1 Maiden Counter on 1 face-up monster your opponent controls. - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) - local sc=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,COUNTER_MAIDEN,1):GetFirst() - if sc then - sc:AddCounter(COUNTER_MAIDEN,1) - end - elseif op==2 then - --Take control of 1 opponent's monster with a Maiden Counter. - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local sc=Duel.SelectMatchingCard(tp,s.controlfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() - if sc then - Duel.GetControl(sc,tp) - end - end -end \ No newline at end of file diff --git a/pre-release/c100443003.lua b/pre-release/c100443003.lua deleted file mode 100644 index b1dacd544f..0000000000 --- a/pre-release/c100443003.lua +++ /dev/null @@ -1,80 +0,0 @@ ---ユーカリ・モール ---Eucalyptus Mole ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 Level 4 or lower Beast monster from your Deck in face-down Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.fdsptg) - e1:SetOperation(s.fdspop) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2) - --Special Summon 1 "Koala" monster from your Deck - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) - 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.koalasptg) - e3:SetOperation(s.koalaspop) - c:RegisterEffect(e3) -end -s.listed_series={SET_KOALA} -function s.fdspfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) -end -function s.fdsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.fdspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,tp,POS_FACEUP_DEFENSE) -end -function s.fdspop(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.fdspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then - Duel.ConfirmCards(1-tp,g) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsAttackPos() then - Duel.BreakEffect() - Duel.ChangePosition(c,POS_FACEUP_DEFENSE) - end - end -end -function s.koalaspfilter(c,e,tp) - return c:IsSetCard(SET_KOALA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.koalasptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.koalaspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.koalaspop(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.koalaspfilter,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 - local c=e:GetHandler() - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) - --Non-Effect Beast monsters you control gain ATK equal to their own original DEF - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsNonEffectMonster() and c:IsRace(RACE_BEAST) end) - e1:SetValue(function(e,c) return c:GetBaseDefense() end) - e1:SetReset(RESET_PHASE|PHASE_END,2) - Duel.RegisterEffect(e1,tp) - end -end \ No newline at end of file diff --git a/pre-release/c100443005.lua b/pre-release/c100443005.lua deleted file mode 100644 index 8a657b806a..0000000000 --- a/pre-release/c100443005.lua +++ /dev/null @@ -1,39 +0,0 @@ ---幻魔の扉 ---Illusion Gate -local s,id=GetID() -function s.initial_effect(c) - --Destroy as many monsters your opponent controls as possible, then you can Special Summon 1 monster from your opponent's GY to your field, ignoring its Summoning conditions - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(Cost.PayLP(1/2)) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) - if chk==0 then return not Duel.HasFlagEffect(tp,id) and #g>0 end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_GRAVE) -end -function s.spfilter(c,e,tp) - return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,0,0,1) - local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) - if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,nil,e,tp) - and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectTarget(tp,aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,1,nil,e,tp) - if #sg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) - end - end -end \ No newline at end of file diff --git a/pre-release/c100443007.lua b/pre-release/c100443007.lua deleted file mode 100644 index 0ffd8ecc80..0000000000 --- a/pre-release/c100443007.lua +++ /dev/null @@ -1,91 +0,0 @@ ---プリマの光 ---Prima Light ---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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Add 1 Warrior or Fairy "Cyber" 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_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_CYBER} -function s.tribfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.nsfilter(c) - return c:IsRace(RACE_WARRIOR) and c:IsSummonable(true,nil) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.CheckReleaseGroup(tp,s.tribfilter,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) - local b2=Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) - elseif op==2 then - e:SetCategory(CATEGORY_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_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 - --Tribute 1 EARTH Warrior monster, and if you do, Special Summon 1 LIGHT Warrior monster from your hand or Deck - local rg=Duel.SelectReleaseGroup(tp,s.tribfilter,1,1,nil,tp) - if #rg>0 and Duel.Release(rg,REASON_EFFECT)>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,false,false,POS_FACEUP) - end - end - elseif op==2 then - --Immediately after this effect resolves, Normal Summon 1 Warrior monster from your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() - if sc then - Duel.Summon(tp,sc,true,nil) - end - end -end -function s.thfilter(c) - return c:IsRace(RACE_WARRIOR|RACE_FAIRY) and c:IsSetCard(SET_CYBER) 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/c100443010.lua b/pre-release/c100443010.lua deleted file mode 100644 index c5890ee4ea..0000000000 --- a/pre-release/c100443010.lua +++ /dev/null @@ -1,67 +0,0 @@ ---魂の結束-ソウル・ユニオン ---Soul Union ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -s.listed_series={SET_ELEMENTAL_HERO} -function s.atkfilter(c) - return c:IsSetCard(SET_ELEMENTAL_HERO) and c:HasNonZeroAttack() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() - e:SetLabelObject(tc) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_FUSION_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.fusconfilter(c) - return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsType(TYPE_NORMAL) and c:IsFaceup() -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg~=2 then return end - local fc=e:GetLabelObject() - local gc=(tg-fc):GetFirst() - if fc:IsFaceup() and not fc:IsImmuneToEffect(e) then - --That monster on the field gains ATK equal to the ATK of that other monster in the GY until the end of this turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(gc:GetAttack()) - e1:SetReset(RESETS_STANDARD_PHASE_END) - fc:RegisterEffect(e1) - if not Duel.IsExistingMatchingCard(s.fusconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) then return end - local params={fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_ELEMENTAL_HERO),matfilter=function(c) return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemove() end,extrafil=s.fextra,extraop=Fusion.BanishMaterial} - if Fusion.SummonEffTG(params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.BreakEffect() - Fusion.SummonEffOP(params)(e,tp,eg,ep,ev,re,r,rp) - end - end -end -function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) - end - return nil -end \ No newline at end of file diff --git a/pre-release/c100443101.lua b/pre-release/c100443101.lua deleted file mode 100644 index b4a1065c52..0000000000 --- a/pre-release/c100443101.lua +++ /dev/null @@ -1,101 +0,0 @@ ---超電導戦士 リニア・マグナム± ---Conduction Warrior Linear Magnum ± ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Must first be Special Summoned (from your hand) by sending 2 "Magnet Warrior" monsters whose original Level is 4 or lower from your hand, Deck, and/or face-up field to the GY - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_FIELD) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EFFECT_SPSUMMON_PROC) - e0:SetRange(LOCATION_HAND) - e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e0:SetCondition(s.spcon) - e0:SetTarget(s.sptg) - e0:SetOperation(s.spop) - c:RegisterEffect(e0) - --Gains ATK equal to half of the ATK 1 other EARTH monster on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,{id,1}) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --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_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,2}) - e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_DESTROY) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MAGNET_WARRIOR} -function s.spconfilter(c) - return c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsMonster() and c:GetOriginalLevel()<=4 - and c:IsAbleToGraveAsCost() and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) -end -function s.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil) - return aux.SelectUnselectGroup(g,e,tp,2,2,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_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil) - local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_TOGRAVE) - if #g>0 then - g:KeepAlive() - 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 not g then return end - Duel.SendtoGrave(g,REASON_COST) - g:DeleteGroup() -end -function s.atkfilter(c) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:HasNonZeroAttack() -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tc=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst() - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,tc:GetAttack()//2) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local c=e:GetHandler() - if tc:IsFaceup() and tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then - --Gains ATK equal to half of that monster's ATK - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(tc:GetAttack()//2) - e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) - c:RegisterEffect(e1) - end -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),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/c100443102.lua b/pre-release/c100443102.lua deleted file mode 100644 index 8341e1eb8a..0000000000 --- a/pre-release/c100443102.lua +++ /dev/null @@ -1,63 +0,0 @@ ---錬金釜-カオス・ディスティル ---Chaos Distill ---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) - --Any card sent to your GY is banished instead - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_IGNORE_RANGE) - e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) - e1:SetRange(LOCATION_SZONE) - e1:SetTargetRange(LOCATION_ALL,0) - e1:SetValue(LOCATION_REMOVED) - e1:SetTarget(function(e,c) return c:IsOwner(e:GetHandlerPlayer()) and Duel.IsPlayerCanRemove(e:GetHandlerPlayer(),c) end) - c:RegisterEffect(e1) - --Activate 1 of these effects - 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_SZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -local CARD_MACRO_COSMOS=30241314 -s.listed_names={CARD_MACRO_COSMOS,id} -function s.macrofilter(c) - return (c:IsCode(CARD_MACRO_COSMOS) or c:ListsCode(CARD_MACRO_COSMOS)) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.monsterfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetTextAttack()==-2 and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.macrofilter,tp,LOCATION_DECK,0,1,nil) - local c=e:GetHandler() - local b2=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_MACRO_COSMOS),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.monsterfilter,tp,LOCATION_DECK,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}) - e:SetLabel(op) - if op==2 then - Duel.Remove(c,POS_FACEUP,REASON_COST) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local thfilter=(e:GetLabel()==1 and s.macrofilter or s.monsterfilter) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/pre-release/c100443103.lua b/pre-release/c100443103.lua deleted file mode 100644 index dfaf24888f..0000000000 --- a/pre-release/c100443103.lua +++ /dev/null @@ -1,66 +0,0 @@ ---ヒーローズルール1 ファイブ・フリーダムス ---Hero's Rule 1: Five Freedoms ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Banish up to 5 cards from the GYs - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.rmvtg) - e1:SetOperation(s.rmvop) - c:RegisterEffect(e1) - --Special Summon 1 of your banished "Elemental HERO" monsters - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_GRAVE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,id) - e2:SetCondition(aux.exccon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_ELEMENTAL_HERO} -function s.rmvfilter(c) - return c:IsAbleToRemove() and aux.SpElimFilter(c) -end -function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) -end -function s.rmvop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,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_REMOVED) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100443104.lua b/pre-release/c100443104.lua deleted file mode 100644 index 6e4745de52..0000000000 --- a/pre-release/c100443104.lua +++ /dev/null @@ -1,76 +0,0 @@ ---デーモンズ・マタドール ---Archfiend Matador ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Add 2 "Archfiend" cards from your Deck to your hand, except "Archfiend Matador" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Cannot be destroyed by battle, also you take no battle damage from battles involving this card - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - c:RegisterEffect(e3) - --Destroy the monster this card battled, and if you do, inflict 1000 damage to your opponent - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLED) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) -end -s.listed_names={100443105,id} --"Ritual of the Matador" -s.listed_series={SET_ARCHFIEND} -function s.thfilter(c) - return c:IsSetCard(SET_ARCHFIEND) 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,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 - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - --This card cannot attack for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(3206) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local bc=e:GetHandler():GetBattleTarget() - if chk==0 then return bc and bc:IsRelateToBattle() end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local bc=e:GetHandler():GetBattleTarget() - if bc and bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)>0 then - Duel.Damage(1-tp,1000,REASON_EFFECT) - end -end diff --git a/pre-release/c100443105.lua b/pre-release/c100443105.lua deleted file mode 100644 index 61c24806c2..0000000000 --- a/pre-release/c100443105.lua +++ /dev/null @@ -1,37 +0,0 @@ ---マタドール降臨の儀式 ダーク・パセオ ---Ritual of the Matador ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - --Ritual Summon "Archfiend Matador" - Ritual.AddProcGreaterCode(c,6,nil,100443104) - --Special Summon 1 non-Ritual "Archfiend" monster from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.SelfBanish) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={100443104} --"Archfiend Matador" -s.listed_series={SET_ARCHFIEND} -function s.spfilter(c,e,tp) - return not c:IsRitualMonster() and c:IsSetCard(SET_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c100445001.lua b/pre-release/c100445001.lua deleted file mode 100644 index b011e672b6..0000000000 --- a/pre-release/c100445001.lua +++ /dev/null @@ -1,107 +0,0 @@ ---滅びの黒魔術師 ---Dark Magician of Destruction ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: "Dark Magician" + 1 LIGHT or DARK monster - Fusion.AddProcMix(c,true,true,CARD_DARK_MAGICIAN,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT|ATTRIBUTE_DARK)) - c:AddMustBeFusionSummoned() - --You can only Fusion Summon or Special Summon by its alternate procedure "Dark Magician of Destruction" once per turn - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_SPSUMMON_SUCCESS) - e0:SetCondition(s.regcon) - e0:SetOperation(s.regop) - c:RegisterEffect(e0) - --You can Special Summon this card by banishing 1 Level 6 or higher DARK Spellcaster monster you control during the turn a Spell Card or effect was activated - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_EXTRA) - e1:SetCondition(s.selfspcon) - e1:SetTarget(s.selfsptg) - e1:SetOperation(s.selfspop) - e1:SetValue(1) - c:RegisterEffect(e1) - --Add 1 "Dark Magician" or 1 card that mentions it from your Deck to your hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --This card's name becomes "Dark Magician" while on the field or in the GY - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_CHANGE_CODE) - e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) - e3:SetValue(CARD_DARK_MAGICIAN) - c:RegisterEffect(e3) - --Keep track of a turn a Spell Card or effect was activated - Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsSpellEffect() end) -end -s.listed_names={CARD_DARK_MAGICIAN} -s.material_setcode=SET_DARK_MAGICIAN -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) - --Prevent another Fusion Summon or Special Summon by its alternate procedure of "Dark Magician of Destruction" that turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCode(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.selfspcostfilter(c,tp,sc) - return c:IsLevelAbove(6) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) - and c:IsAbleToRemoveAsCost() and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 -end -function s.selfspcon(e,c) - if not c then return true end - local tp=c:GetControler() - return (Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)>0 or Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0) - and Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) -end -function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_MZONE,0,1,1,true,nil,tp,c) - if g and #g>0 then - g:KeepAlive() - 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 not g then return end - Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) - g:DeleteGroup() -end -function s.thfilter(c) - return (c:IsCode(CARD_DARK_MAGICIAN) or c:ListsCode(CARD_DARK_MAGICIAN)) and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/pre-release/c100445002.lua b/pre-release/c100445002.lua deleted file mode 100644 index 840c21495d..0000000000 --- a/pre-release/c100445002.lua +++ /dev/null @@ -1,86 +0,0 @@ ---合体魔竜ティマイオス ---Timaeus the United Magidragon ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: "Dark Magician" or "Dark Magician Girl" + 1 Dragon or Spellcaster monster - Fusion.AddProcMix(c,true,true,{CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL},aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)) - --After this card is Special Summoned, until the end of your next turn, it is unaffected by other cards' effects - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e0:SetCode(EVENT_SPSUMMON_SUCCESS) - e0:SetOperation(s.regop) - c:RegisterEffect(e0) - --Make this card gain 100 ATK for each Spell in the GYs and banishment - 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:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) - c:RegisterEffect(e1) - --Destroy 1 Spell/Trap on the field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.material_setcode={SET_DARK_MAGICIAN,SET_MAGICIAN_GIRL,SET_DARK_MAGICIAN_GIRL} -s.listed_names={CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL} -function s.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local ct=Duel.IsTurnPlayer(tp) and 3 or 2 - --Unaffected by other cards' effects - local e1=Effect.CreateEffect(c) - e1:SetDescription(3100) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetValue(function(e,re) return e:GetHandler()~=re:GetOwner() end) - e1:SetReset(RESETS_STANDARD_PHASE_END,ct) - c:RegisterEffect(e1) -end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSpell),tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,nil) - if chk==0 then return ct>0 end - Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,100*ct) -end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSpell),tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,nil) - if ct==0 then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - --Gains 100 ATK for each Spell in the GYs and banishment - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(100*ct) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) - c:RegisterEffect(e1) - end -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c100445003.lua b/pre-release/c100445003.lua deleted file mode 100644 index 24e15e5fd4..0000000000 --- a/pre-release/c100445003.lua +++ /dev/null @@ -1,60 +0,0 @@ ---ティマイオスの眼光 ---The Gaze of Timaeus ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Fusion Summon 1 Fusion Monster from your Extra Deck that mentions a targeted "Dark Magician" or "Dark Magician Girl" as material, by shuffling that target into the Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) -end -s.listed_names={CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL,1784686} --"The Eye of Timaeus" -function s.tdfilter(c,e,tp) - return c:IsCode(CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL) and c:IsFaceup() - and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) -end -function s.spfilter(c,e,tp,mc) - if Duel.GetLocationCountFromEx(tp,tp,mc,c)<=0 then return false end - local mustg=aux.GetMustBeMaterialGroup(tp,nil,tp,c,nil,REASON_FUSION) - return c:IsType(TYPE_FUSION) and c:ListsCodeAsMaterial(mc:GetCode()) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) - and (#mustg==0 or (#mustg==1 and mustg:IsContains(mc))) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc==0 then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsCanBeFusionMaterial() and not tc:IsImmuneToEffect(e) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc):GetFirst() - if sc then - sc:SetMaterial(Group.FromCards(tc)) - Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT|REASON_MATERIAL|REASON_FUSION) - Duel.BreakEffect() - if Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)>0 then - sc:CompleteProcedure() - --Banish it during the End Phase of the next turn - local turn_summoned=Duel.GetTurnCount() - aux.DelayedOperation(sc,PHASE_END,id,e,tp, - function(sc) Duel.Remove(sc,POS_FACEUP,REASON_EFFECT) end, - function() return Duel.GetTurnCount()==turn_summoned+1 end, - nil,2,aux.Stringid(id,1) - ) - end - end - end -end \ No newline at end of file diff --git a/pre-release/c100445024.lua b/pre-release/c100445024.lua deleted file mode 100644 index 8695f4d3c8..0000000000 --- a/pre-release/c100445024.lua +++ /dev/null @@ -1,69 +0,0 @@ ---M・HERO ダスク・クロウ ---Masked HERO Dusk Crow ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Masked HERO" monster from your Deck or GY to your hand, except "Masked HERO Dusk Crow" - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) -end -s.listed_series={SET_HERO,SET_MASKED_HERO} -s.listed_names={id} -function s.spcostfilter(c) - return c:IsSetCard(SET_HERO) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return c:IsSetCard(SET_MASKED_HERO) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|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/c100445025.lua b/pre-release/c100445025.lua deleted file mode 100644 index 66342fd025..0000000000 --- a/pre-release/c100445025.lua +++ /dev/null @@ -1,91 +0,0 @@ ---M・HERO ファーネス ---Masked HERO Furnace ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "Mask Change" or "Polymerization" from your Deck to your hand, then discard 1 card - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.AND(Cost.SelfReveal,s.thcost)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Special Summon this card if you Special Summon a non-FIRE "HERO" Fusion Monster - 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_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Checks to see if non-"HERO" monsters were Summoned from the Extra Deck - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(SET_HERO) end) -end -s.listed_series={SET_HERO} -s.listed_names={21143940,CARD_POLYMERIZATION} --"Mask Change" -function s.thcost(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 from the Extra Deck the turn you activate this effect, 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_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_HERO) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.thfilter(c) - return c:IsCode(21143940,CARD_POLYMERIZATION) 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 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.spconfilter(c,tp) - return c:IsAttributeExcept(ATTRIBUTE_FIRE) and c:IsSetCard(SET_HERO) and c:IsType(TYPE_FUSION) and c:IsSummonPlayer(tp) and c:IsFaceup() -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.spconfilter,1,nil,tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --Banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - c:RegisterEffect(e1,true) - end -end \ No newline at end of file diff --git a/pre-release/c100445026.lua b/pre-release/c100445026.lua deleted file mode 100644 index b0cb87ac7e..0000000000 --- a/pre-release/c100445026.lua +++ /dev/null @@ -1,76 +0,0 @@ ---M・HERO アトミック ---Masked HERO Atomic ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Must be Special Summoned with "Mask Change" - c:AddMustBeSpecialSummoned() - --The first time this card would be destroyed by battle or card effect each turn, it is not destroyed - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetValue(function(e,re,r,rp) return (r&(REASON_BATTLE|REASON_EFFECT))>0 end) - c:RegisterEffect(e1) - --Special Summon 1 non-FIRE "Masked HERO" monster from your GY or banishment in Defense Position - 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+EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,id) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Set 1 "Change" Quick-Play Spell from your GY - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_LEAVE_GRAVE) - 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,1}) - 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_MASKED_HERO,SET_CHANGE} -function s.spfilter(c,e,tp) - return c:IsAttributeExcept(ATTRIBUTE_FIRE) and c:IsSetCard(SET_MASKED_HERO) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,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|LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP_DEFENSE) - end -end -function s.setfilter(c) - return c:IsSetCard(SET_CHANGE) and c:IsQuickPlaySpell() 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_LEAVE_GRAVE,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/c100445057.lua b/pre-release/c100445057.lua deleted file mode 100644 index c735e086a0..0000000000 --- a/pre-release/c100445057.lua +++ /dev/null @@ -1,106 +0,0 @@ ---御巫奉サナキ ---Sanaki the Mikanko Devotee ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Return 1 "Mikanko" card you control to the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Special Summon 1 non-Illusion "Mikanko" 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_EQUIP) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Equip this card to 1 face-up monster on the field as an Equip Spell - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_EQUIP) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_TO_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetTarget(s.eqtg) - e3:SetOperation(s.eqop) - c:RegisterEffect(e3) -end -s.listed_series={SET_MIKANKO} -function s.thfilter(c) - return c:IsSetCard(SET_MIKANKO) and c:IsFaceup() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - end -end -function s.spfilter(c,e,tp) - return not c:IsRace(RACE_ILLUSION) and c:IsSetCard(SET_MIKANKO) 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 - 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 - --You cannot Special Summon from the Extra Deck for the rest of this turn, except "Mikanko" monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MIKANKO) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,tp,0) -end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Equip(tp,c,tc) then - --Equip limit - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetValue(function(e,c) return c==tc end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - c:RegisterEffect(e1) - end -end \ No newline at end of file diff --git a/pre-release/c100445058.lua b/pre-release/c100445058.lua deleted file mode 100644 index c8b64c8173..0000000000 --- a/pre-release/c100445058.lua +++ /dev/null @@ -1,63 +0,0 @@ ---ウズヒメの御巫 ---Uzuhime the Manifested Mikanko ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 3 "Mikanko" monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MIKANKO),3,2) - --Add 1 Equip Spell from your Deck or GY to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Cannot be destroyed by battle, also your opponent takes any battle damage you would have taken from battles involving this card - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) - c:RegisterEffect(e3) - --Make another attack in a row - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_DAMAGE_STEP_END) - e4:SetCondition(s.atcon) - e4:SetCost(Cost.Detach(1)) - e4:SetOperation(s.atop) - c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) -end -s.listed_series={SET_MIKANKO} -function s.thfilter(c) - return c:IsEquipSpell() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.atcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.GetAttacker()==c and c:CanChainAttack(0) -end -function s.atop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToBattle() then - Duel.ChainAttack() - end -end \ No newline at end of file diff --git a/pre-release/c100445059.lua b/pre-release/c100445059.lua deleted file mode 100644 index c84cd4a2ea..0000000000 --- a/pre-release/c100445059.lua +++ /dev/null @@ -1,85 +0,0 @@ ---御巫神舞-二貴子 ---Mikanko Divine Dance - Futahashira no Uzu no Miko ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Send 1 "Mikanko" card from your Deck to the GY, except "Mikanko Divine Dance - Futahashira no Uzu no Miko", then you can Set 1 "Mikanko" Spell/Trap from your Deck, except "Mikanko Divine Dance - Futahashira no Uzu no Miko" - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetTarget(s.tgtg) - e1:SetOperation(s.tgop) - c:RegisterEffect(e1) - --Special Summon 1 "Mikanko" Ritual Monster from your hand or Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,id) - e2:SetCost(Cost.AND(Cost.SelfBanish,s.spcost)) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_MIKANKO} -function s.tgfilter(c) - return c:IsSetCard(SET_MIKANKO) and c:IsAbleToGrave() and not c:IsCode(id) -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.setfilter(c) - return c:IsSetCard(SET_MIKANKO) and c:IsSpellTrap() and c:IsSSetable() and not c:IsCode(id) -end -function s.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local dg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - if #dg>0 and Duel.SendtoGrave(dg,REASON_EFFECT)>0 and dg:GetFirst():IsLocation(LOCATION_GRAVE) then - local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local sg=g:Select(tp,1,1,nil) - if #sg>0 then - Duel.BreakEffect() - Duel.SSet(tp,sg) - end - end - end - if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - --You cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves, except "Mikanko" monsters - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MIKANKO) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end - Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_MIKANKO) and c:IsRitualMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,true) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101301081.lua b/pre-release/c101301081.lua deleted file mode 100644 index cf76d0be32..0000000000 --- a/pre-release/c101301081.lua +++ /dev/null @@ -1,78 +0,0 @@ ---Japanese name ---Buio the Dawn's Light ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Monsters in your leftmost or rightmost Main Monster Zones cannot be destroyed by card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSequence(0,4) or (Duel.IsDuelType(DUEL_3_COLUMNS_FIELD) and c:IsSequence(1,3)) end) - e1:SetValue(1) - c:RegisterEffect(e1) - --Negate the effects of 1 Fiend Effect Monster you control, and if you do, Special Summon this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 "Mutiny in the Sky" from your Deck to your hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_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={101301083} --"Mutiny in the Sky" -function s.disfilter(c) - return c:IsRace(RACE_FIEND) and c:IsType(TYPE_EFFECT) and c:IsNegatableMonster() -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,LOCATION_MZONE,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_NEGATE) - local g=Duel.SelectTarget(tp,s.disfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then - --Negate its effects - tc:NegateEffects(c) - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end - end -end -function s.thfilter(c) - return c:IsCode(101301083) 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/c101301082.lua b/pre-release/c101301082.lua deleted file mode 100644 index eaab6fd385..0000000000 --- a/pre-release/c101301082.lua +++ /dev/null @@ -1,86 +0,0 @@ ---Japanese name ---Luce the Dusk's Dark ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 3 Fiend and/or Fairy monsters in your GY - Fusion.AddProcMixN(c,true,true,s.fusionmatfilter,3) - --Monsters in your leftmost or rightmost Main Monster Zones cannot be destroyed by card effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSequence(0,4) or (Duel.IsDuelType(DUEL_3_COLUMNS_FIELD) and c:IsSequence(1,3)) end) - e1:SetValue(1) - c:RegisterEffect(e1) - --Send 1 Fiend or Fairy monster from your Deck to the GY, and if you do, destroy 1 card your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetTarget(s.tgdestg) - e2:SetOperation(s.tgdesop) - c:RegisterEffect(e2) - --Destroy 1 card on the field - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.descon) - e3:SetTarget(s.destg) - e3:SetOperation(s.desop) - c:RegisterEffect(e3) -end -function s.fusionmatfilter(c,fc,sumtype,tp) - return c:IsRace(RACE_FIEND|RACE_FAIRY,fc,sumtype,tp) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) -end -function s.tgfilter(c) - return c:IsRace(RACE_FIEND|RACE_FAIRY) and c:IsAbleToGrave() -end -function s.tgdestg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) - and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.tgdesop(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) and g:GetFirst():IsLocation(LOCATION_GRAVE) then - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - end -end -function s.desconfilter(c,tp) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.desconfilter,1,nil,tp) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301083.lua b/pre-release/c101301083.lua deleted file mode 100644 index b17574ac88..0000000000 --- a/pre-release/c101301083.lua +++ /dev/null @@ -1,48 +0,0 @@ ---Japanese name ---Mutiny in the Sky ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Fusion Summon 1 Fiend or Fairy Fusion Monster from your Extra Deck, by shuffling Fiend and/or Fairy monsters from your GY into the Deck - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND|RACE_FAIRY),aux.FALSE,s.fextra,Fusion.ShuffleMaterial) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCountLimit(1,id) - c:RegisterEffect(e1) - --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 -function s.matfilter(c) - return c:IsRace(RACE_FIEND|RACE_FAIRY) and c:IsAbleToDeck() -end -function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_GRAVE,0,nil) -end -function s.thcostfilter(c) - return c:IsRace(RACE_FIEND|RACE_FAIRY) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) 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_HAND|LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) - Duel.SendtoGrave(g,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/c101301084.lua b/pre-release/c101301084.lua deleted file mode 100644 index 82ec4b92a0..0000000000 --- a/pre-release/c101301084.lua +++ /dev/null @@ -1,64 +0,0 @@ --- ---Miracle Raven ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - Pendulum.AddProcedure(c) - c:AddMustBeRitualSummoned() - --Ritual Summon this card, by Tributing monsters from your hand or field whose total Levels equal or exceed 1 - local e1=Ritual.CreateProc({ - handler=c, - lvtype=RITPROC_GREATER, - filter=function(rc) return rc==c end, - lv=1, - location=LOCATION_PZONE, - desc=aux.Stringid(id,0), - self=true - }) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1) - c:RegisterEffect(e1) - --This Ritual Summoned card is unaffected by your opponent's activated 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:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) - e2:SetValue(function(e,te) return te:IsActivated() and te:GetOwnerPlayer()==1-e:GetHandlerPlayer() end) - c:RegisterEffect(e2) - --If you Ritual Summon exactly 1 Ritual Monster with a card effect that requires use of monsters, this card you control can be used as the entire Tribute - local e3=Ritual.AddWholeLevelTribute(c,aux.TRUE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE) - --Add 1 Ritual Monster from your Deck to your hand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_RELEASE) - e4:SetCountLimit(1,id) - e4:SetCondition(function(e) return e:GetHandler():IsReason(REASON_RITUAL) end) - e4:SetTarget(s.thtg) - e4:SetOperation(s.thop) - c:RegisterEffect(e4) -end -s.listed_names={id} -function s.thfilter(c) - return c:IsRitualMonster() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end diff --git a/pre-release/c101301085.lua b/pre-release/c101301085.lua deleted file mode 100644 index ae89096a2d..0000000000 --- a/pre-release/c101301085.lua +++ /dev/null @@ -1,93 +0,0 @@ --- ---ASHLAN U1000 ---scripted by pyrQ -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 monsters with different Types and Attributes - Link.AddProcedure(c,nil,2,nil,s.spcheck) - --If a Ritual Monster this card points to attacks a Defense Position monster, inflict piercing battle damage to your opponent - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(function(e,c) return c:IsRitualMonster() and e:GetHandler():GetLinkedGroup():IsContains(c) end) - c:RegisterEffect(e1) - --Add 1 Ritual Monster with a different Type and Attribute than the revealed monster 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_MZONE) - e2:SetCountLimit(1,id) - e2:SetCost(s.thcost) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) - --Return 1 face-up card your opponent controls to the hand - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_TOHAND) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.rthcon) - e3:SetTarget(s.rthtg) - e3:SetOperation(s.rthop) - c:RegisterEffect(e3) -end -function s.spcheck(g,lc,sumtype,tp) - return g:CheckDifferentPropertyBinary(Card.GetRace,lc,sumtype,tp) and g:CheckDifferentPropertyBinary(Card.GetAttribute,lc,sumtype,tp) -end -function s.thcostfilter(c,tp) - return c:IsRitualMonster() and not c:IsPublic() - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetRace(),c:GetAttribute()) -end -function s.thfilter(c,race,attribute) - return c:IsRitualMonster() and c:IsDifferentRace(race) and c:IsAttributeExcept(attribute) and c:IsAbleToHand() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst() - Duel.ConfirmCards(1-tp,rc) - Duel.ShuffleHand(tp) - e:SetLabelObject(rc) - rc:CreateEffectRelation(e) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local rc=e:GetLabelObject() - if not rc:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,rc:GetRace(),rc:GetAttribute()) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.rthconfilter(c,tp) - return c:IsRitualSummoned() and c:IsSummonPlayer(tp) -end -function s.rthcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.rthconfilter,1,nil,tp) -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.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToHand),tp,0,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 \ No newline at end of file diff --git a/pre-release/c101301086.lua b/pre-release/c101301086.lua deleted file mode 100644 index 097e6665c9..0000000000 --- a/pre-release/c101301086.lua +++ /dev/null @@ -1,85 +0,0 @@ --- ---Readying of Rites ---scripted by pyrQ -local s,id=GetID() -local TOKEN_SACIFICIAL_OFFERING=id+100 -function s.initial_effect(c) - --Add 1 Fiend Ritual Monster from your Deck to your hand, then if you added a Pendulum Monster, you can Special Summon 1 "Sacrificial Offering Token" (Fiend/DARK/Level 1/ATK 300/DEF 300) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Draw 1 card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.drcon) - e2:SetCost(Cost.SelfBanish) - e2:SetTarget(s.drtg) - e2:SetOperation(s.drop) - c:RegisterEffect(e2) -end -s.listed_names={TOKEN_SACIFICIAL_OFFERING} -function s.thfilter(c) - return c:IsRace(RACE_FIEND) and c:IsRitualMonster() and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() - if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then - Duel.ConfirmCards(1-tp,sc) - Duel.ShuffleHand(tp) - if sc:IsType(TYPE_PENDULUM) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SACIFICIAL_OFFERING,0,TYPES_TOKEN,300,300,1,RACE_FIEND,ATTRIBUTE_DARK) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - local token=Duel.CreateToken(tp,TOKEN_SACIFICIAL_OFFERING) - Duel.BreakEffect() - if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)>0 then - token:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) - --While you control that Token, you cannot Special Summon from the Extra Deck - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - 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:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - token:RegisterEffect(e1,true) - end - end - end -end -function s.drconfilter(c,tp) - return c:IsRitualMonster() and c:IsControler(tp) -end -function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and eg:IsExists(s.drconfilter,1,nil,tp) -end -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) -end -function s.drop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/pre-release/c101301087.lua b/pre-release/c101301087.lua deleted file mode 100644 index 30ed6052bb..0000000000 --- a/pre-release/c101301087.lua +++ /dev/null @@ -1,98 +0,0 @@ --- ---Steel-Stringed Sacrifice ---Scripted by Hatter -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_IGNITION) - e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) - e1:SetCost(s.effcost) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) -end -function s.effcostfilter(c) - return c:IsLevelAbove(5) and not c:IsPublic() -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.effcostfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,s.effcostfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() - Duel.ConfirmCards(1-tp,rc) - Duel.ShuffleHand(tp) - e:SetLabelObject(rc) - e:SetLabel(rc:GetOriginalCodeRule()) - rc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) -end -function s.thfilter(c) - return c:IsLevelAbove(5) and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - local b1=c:IsLocation(LOCATION_HAND) and not Duel.HasFlagEffect(tp,id) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - local b2=c:IsLocation(LOCATION_GRAVE) and not Duel.HasFlagEffect(tp,id+100) and c:IsAbleToHand() - local b3=c:IsLocation(LOCATION_GRAVE) and not Duel.HasFlagEffect(tp,id+200) - and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,c) - if chk==0 then return b1 or b2 or b3 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}, - {b3,aux.Stringid(id,4)}) - Duel.SetTargetParam(op) - Duel.RegisterFlagEffect(tp,id+(op-1)*100,RESET_PHASE|PHASE_END,0,1) - if op==1 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - elseif op==2 then - e:SetCategory(CATEGORY_TOHAND) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) - elseif op==3 then - e:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local code=e:GetLabel() - local rc=e:GetLabelObject() - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,5)) - --Register if the player Normal Summons the revealed monster or a monster with the same original name - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCountLimit(1) - e1:SetCondition(function(e,tp,eg,ep) return ep==tp and ((rc:HasFlagEffect(id) and eg:IsContains(rc) and rc:IsFaceup()) or eg:IsExists(aux.FaceupFilter(Card.IsOriginalCodeRule,code),1,nil)) end) - e1:SetOperation(function(e) e:SetLabel(1) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --During the End Phase of this turn, lose 1000 LP if you did not Normal Summon the revealed monster, or a monster with the same original name - local e2=e1:Clone() - e2:SetDescription(aux.Stringid(id,6)) - e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetCondition(function() return e1:GetLabel()==0 end) - e2:SetOperation(function(e,tp) Duel.SetLP(tp,Duel.GetLP(tp)-1000) end) - Duel.RegisterEffect(e2,tp) - if not c:IsRelateToEffect(e) then return end - local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if op==1 then - --Special Summon this card from your hand - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - elseif op==2 then - --Add this card from your GY to your hand - Duel.SendtoHand(c,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,c) - elseif op==3 then - --Banish this card from your GY, and if you do, add 1 Level 5 or higher monster from your GY to your hand - if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)==0 or not c:IsLocation(LOCATION_REMOVED) then return end - 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 -end \ No newline at end of file diff --git a/pre-release/c101301088.lua b/pre-release/c101301088.lua deleted file mode 100644 index f66e6fb0ce..0000000000 --- a/pre-release/c101301088.lua +++ /dev/null @@ -1,81 +0,0 @@ ---Japanese name ---Xyz Lay ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - local e0=aux.AddEquipProcedure(c) - e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - --The equipped monster gains 200 ATK for each Xyz Material attached to a monster on the field - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(function(e) return 200*Duel.GetOverlayCount(0,1,1) end) - c:RegisterEffect(e1) - --Activate the following effect, based on the equipped monster's card type - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) - e2:SetCost(s.effcost) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_XYZ} -function s.thcfilter(c) - return c:IsAttribute(ATTRIBUTE_WIND) and c:IsMonster() and c:IsDiscardable() -end -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local ec=e:GetHandler():GetEquipTarget() - if chk==0 then return not ec:IsType(TYPE_XYZ) or Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_COST) end - if ec:IsType(TYPE_XYZ) then - Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_COST) - end -end -function s.setfilter(c) - return c:IsSetCard(SET_XYZ) and c:IsSpellTrap() and c:IsSSetable() -end -function s.spfilter(c,e,tp,lv) - return c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local ec=e:GetHandler():GetEquipTarget() - local b1=ec:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) - local b2=not ec:IsType(TYPE_XYZ) and ec:HasLevel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,ec:GetLevel()) - if chk==0 then return b1 or b2 end - if b1 then - e:SetLabel(1) - e:SetCategory(0) - Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,1)) - elseif b2 then - e:SetLabel(2) - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,2)) - Duel.SetOperationInfo(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 - --Set 1 "Xyz" Spell/Trap from your Deck - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SSet(tp,g) - end - elseif op==2 then - --Special Summon 1 monster with the same Level as the equipped monster from your hand in Defense Position - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local c=e:GetHandler() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,c:GetEquipTarget():GetLevel()):GetFirst() - if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then - --Negate its effects - sc:NegateEffects(c) - end - Duel.SpecialSummonComplete() - end -end \ No newline at end of file diff --git a/pre-release/c101301089.lua b/pre-release/c101301089.lua deleted file mode 100644 index 2175ab4fba..0000000000 --- a/pre-release/c101301089.lua +++ /dev/null @@ -1,72 +0,0 @@ --- ---Psychic Omnibuster ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner Psychic monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsRace,RACE_PSYCHIC),1,99) - --Look at 1 random card in your opponent's hand, and if it is the declared card type, apply these effects in sequence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_REMOVE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function(e,tp,eg,ep,ev) return ep==1-tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&(LOCATION_MZONE|LOCATION_SZONE)>0 end) - e1:SetCost(Cost.PayLP(2000)) - e1:SetTarget(s.looktg) - e1:SetOperation(s.lookop) - c:RegisterEffect(e1) - aux.GlobalCheck(s,function() - s.declared_types={} - s.declared_types[0]=0 - s.declared_types[1]=0 - aux.AddValuesReset(function() - s.declared_types[0]=0 - s.declared_types[1]=0 - end) - end) -end -function s.looktg(e,tp,eg,ep,ev,re,r,rp,chk) - local declared_types=s.declared_types[tp] - if chk==0 then return declared_types~=(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) - local op=Duel.SelectEffect(tp, - {declared_types&TYPE_MONSTER==0,DECLTYPE_MONSTER}, - {declared_types&TYPE_SPELL==0,DECLTYPE_SPELL}, - {declared_types&TYPE_TRAP==0,DECLTYPE_TRAP}) - local typ=1<<(op-1) - s.declared_types[tp]=declared_types|typ - Duel.SetTargetParam(typ) -end -function s.lookop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then return end - local rc=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1):GetFirst() - Duel.ConfirmCards(tp,rc) - Duel.ShuffleHand(1-tp) - local typ=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if not rc:IsType(typ) then return end - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - local desc=(typ==TYPE_MONSTER and 3010) - or (typ==TYPE_SPELL and 3011) - or (typ==TYPE_TRAP and 3012) - Duel.BreakEffect() - --This card cannot be destroyed by the effects of the declared card type this turn - local e1=Effect.CreateEffect(c) - e1:SetDescription(desc) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetValue(function(e,te) return te:IsActiveType(typ) end) - e1:SetReset(RESETS_STANDARD_PHASE_END) - c:RegisterEffect(e1) - end - if rc:IsAbleToRemove() then - Duel.BreakEffect() - --Banish the card you looked at, face-up, until the End Phase - aux.RemoveUntil(rc,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY,PHASE_END,id,e,tp,function(ag) Duel.SendtoHand(ag,nil,REASON_EFFECT) end) - end -end \ No newline at end of file diff --git a/pre-release/c101301090.lua b/pre-release/c101301090.lua deleted file mode 100644 index 0fe6854615..0000000000 --- a/pre-release/c101301090.lua +++ /dev/null @@ -1,59 +0,0 @@ --- ---R.B. Ga10 Driller ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) - 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,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) - --Destroy both 1 monster your opponent controls and this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCondition(s.descon) - e2:SetCost(Cost.PayLP(500)) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_RB} -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) -end -function s.desconfilter(c,ec,lg) - return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) 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,tp)+e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,0) -end -function s.desop(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:IsMonster() then - Duel.Destroy(Group.FromCards(tc,c),REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301091.lua b/pre-release/c101301091.lua deleted file mode 100644 index c20fdbf914..0000000000 --- a/pre-release/c101301091.lua +++ /dev/null @@ -1,62 +0,0 @@ --- ---R.B. Ga10 Cutter ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) - 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,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) - --Destroy this card, and if you do, negate a Spell/Trap Card or effect activated by your opponent, and if you do that, destroy that card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.descon) - e2:SetCost(Cost.PayLP(700)) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_RB} -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) -end -function s.desconfilter(c,ec,lg) - return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return rp==1-tp and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) - and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return true end - local c=e:GetHandler() - local rc=re:GetHandler() - if rc:IsRelateToEffect(re) and rc:IsDestructable() then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg+c,2,tp,0) - else - Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) - end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 - and Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301092.lua b/pre-release/c101301092.lua deleted file mode 100644 index 750a65ebd1..0000000000 --- a/pre-release/c101301092.lua +++ /dev/null @@ -1,61 +0,0 @@ --- ---R.B. VALCan Rocket ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) - 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,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) - --Destroy up to 2 cards your opponent controls, also this card, and if you do, inflict 500 damage to your opponent for each card destroyed - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.descon) - e2:SetCost(Cost.PayLP(1000)) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_RB} -function s.spcon(e,c) - if c==nil then return true end - local tp=e:GetHandlerPlayer() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) -end -function s.desconfilter(c,ec,lg) - return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,2,nil,tp)+e:GetHandler() - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tg=Duel.GetTargetCards(e) - if c:IsRelateToEffect(e) then tg:AddCard(c) end - if #tg==0 then return end - local dam=Duel.Destroy(tg,REASON_EFFECT)*500 - if dam>0 then - Duel.Damage(1-tp,dam,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101301093.lua b/pre-release/c101301093.lua deleted file mode 100644 index 5af62abb67..0000000000 --- a/pre-release/c101301093.lua +++ /dev/null @@ -1,86 +0,0 @@ --- ---R.B. VALCan Booster ---Scripted by Hatter -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,2) - --Add 1 "R.B." 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_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Special Summon 1 "R.B." monster from your hand or GY in Defense Position, then you can move this card you control to another of your Main Monster Zones - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_EMZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) -end -s.listed_series={SET_RB} -function s.thfilter(c) - return c:IsSetCard(SET_RB) and c:IsSpell() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -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_RB) 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 chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) - if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 - and c:IsRelateToEffect(e) and c:IsControler(tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) - local seq=math.log(Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0),2) - Duel.BreakEffect() - Duel.MoveSequence(c,seq) - end - end - --You cannot Special Summon from the Extra Deck for the rest of this turn, except Machine monsters with 1500 or less ATK - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsRace(RACE_MACHINE) and c:IsAttackBelow(1500)) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - --"Clock Lizard" check - aux.addTempLizardCheck(c,tp,function(e,c) - local atk=c:GetTextAttack() - return not c:IsOriginalRace(RACE_MACHINE) or atk==-2 or atk>1500 - end) -end \ No newline at end of file diff --git a/pre-release/c101301094.lua b/pre-release/c101301094.lua deleted file mode 100644 index 9b08ee05bf..0000000000 --- a/pre-release/c101301094.lua +++ /dev/null @@ -1,69 +0,0 @@ ---JP Name ---R.B. The Brute Blues ---Scripted by The Razgriz -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) - --Gains total original ATK of "R.B." monsters this card points to while it points to a "R.B." monster - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) - e1:SetValue(s.atkval) - c:RegisterEffect(e1) - --Can make a second attack during each Battle Phase while it points to a "R.B." monster - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) - e2:SetValue(1) - c:RegisterEffect(e2) - --Cannot be destroyed by battle or card effects while it points to a "R.B." monster - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e3:SetRange(LOCATION_MZONE) - e3:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) - e3:SetValue(1) - c:RegisterEffect(e3) - local e4=e3:Clone() - e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e4) - --Add 1 "R.B." card from your Deck to your hand - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,0)) - e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e5:SetType(EFFECT_TYPE_IGNITION) - e5:SetRange(LOCATION_MZONE) - e5:SetCountLimit(1,id) - e5:SetTarget(s.thtg) - e5:SetOperation(s.thop) - c:RegisterEffect(e5) -end -s.listed_series={SET_RB} -function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(SET_RB) and c:GetBaseAttack()>=0 -end -function s.atkval(e,c) - return c:GetLinkedGroup():Filter(s.atkfilter,nil):GetSum(Card.GetBaseAttack) -end -function s.thfilter(c) - return c:IsSetCard(SET_RB) 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/c101301095.lua b/pre-release/c101301095.lua deleted file mode 100644 index 69dde151b5..0000000000 --- a/pre-release/c101301095.lua +++ /dev/null @@ -1,83 +0,0 @@ ---JP Name ---R.B. Funk Dock ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Add 1 "R.B." card from your Deck to your hand, except "R.B. Funk Dock" - 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) - --Gain 500 LP each time a monster(s) your opponent controls is destroyed - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_FZONE) - e2:SetCondition(s.lpcon) - e2:SetOperation(function(e) Duel.Hint(HINT_CARD,0,id) Duel.Recover(e:GetHandlerPlayer(),500,REASON_EFFECT) end) - c:RegisterEffect(e2) - --Special Summon 1 "R.B." monster from your Deck - 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) - e3:SetCode(EVENT_LEAVE_FIELD) - e3:SetRange(LOCATION_FZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.spcon) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_series={SET_RB} -s.listed_names={id} -function s.thfilter(c) - return c:IsSetCard(SET_RB) and c:IsAbleToHand() and not c:IsCode(id) -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.lpconfilter(c,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE|REASON_EFFECT) -end -function s.lpcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.lpconfilter,1,nil,1-tp) -end -function s.spconfilter(c,tp) - return c:IsPreviousSetCard(SET_RB) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) - and c:IsReason(REASON_EFFECT) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.spconfilter,1,nil,tp) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_RB) 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 diff --git a/pre-release/c101301096.lua b/pre-release/c101301096.lua deleted file mode 100644 index c8137974be..0000000000 --- a/pre-release/c101301096.lua +++ /dev/null @@ -1,69 +0,0 @@ ---JP Name ---R.B. Stage Landing ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Special Summon 1 "R.B." monster from your Deck/Extra Deck with a different name from the cards you control - 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:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or (c:IsRace(RACE_MACHINE) and c:GetBaseAttack()<=1500) end) - --If an "R.B." monster(s) you control would be destroyed, you can banish this card from your GY instead - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_GRAVE) - e2:SetTarget(s.reptg) - e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) - e2:SetOperation(function(e) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end) - c:RegisterEffect(e2) -end -s.listed_series={SET_RB} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - --You cannot Special Summon from the Extra Deck the turn you activate this card, except Machine monsters with 1500 or less original ATK - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,1)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsRace(RACE_MACHINE) and c:GetBaseAttack()<=1500) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.spfilter(c,e,tp) - if not (c:IsSetCard(SET_RB) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD,0,1,nil)) then return false end - if c:IsLocation(LOCATION_DECK) then - return Duel.GetMZoneCount(tp)>0 - elseif c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_RB) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE|REASON_EFFECT) -end -function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end - return Duel.SelectEffectYesNo(tp,c,96) -end \ No newline at end of file diff --git a/pre-release/c101302006.lua b/pre-release/c101302006.lua deleted file mode 100644 index 9dc7f1a534..0000000000 --- a/pre-release/c101302006.lua +++ /dev/null @@ -1,91 +0,0 @@ ---剛鬼マシン・スープレックス ---Gouki Mashin Suprex ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon both this card and 1 "Gouki" monster in 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) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Add 1 "Gouki" card from your Deck to your hand, except "Gouki Mashin Suprex" - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_GOUKI} -s.listed_names={id} -function s.spcostfilter(c,e,tp) - return c:IsSetCard(SET_GOUKI) and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not c:IsPublic() - and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local rc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c,e,tp):GetFirst() - e:SetLabelObject(rc) - rc:CreateEffectRelation(e) - Duel.ConfirmCards(1-tp,Group.FromCards(c,rc)) - Duel.ShuffleHand(tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,e:GetLabelObject()),2,tp,0) -end -function s.spfilter(c,e,tp) - return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local c=e:GetHandler() - local sg=Group.FromCards(c,e:GetLabelObject()) - if sg:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then - for sc in sg:Iter() do - sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) - --You cannot Special Summon, except "Gouki" 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+EFFECT_FLAG_UNCOPYABLE) - 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 not c:IsSetCard(SET_GOUKI) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1,true) - end - end -end -function s.thfilter(c) - return c:IsSetCard(SET_GOUKI) 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/c101302012.lua b/pre-release/c101302012.lua deleted file mode 100644 index 29b8b7dde0..0000000000 --- a/pre-release/c101302012.lua +++ /dev/null @@ -1,70 +0,0 @@ ---絢嵐たるメガラ ---Magnifistorming Megala ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, you can Special Summon this card (from your hand) - 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,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.selfspcon) - c:RegisterEffect(e1) - --Special Summon 1 "Magnifistorm" monster from your Deck with a different name from the monsters you control - 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) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - 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_MAGNIFISTORM} -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -function s.selfspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) - or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and (rc:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) or (rc:IsSetCard(SET_MAGNIFISTORM) and rc:IsQuickPlaySpell())) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_MAGNIFISTORM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_MZONE,0,1,nil) -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 - 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 - --You cannot Special Summon for the rest of this turn, except WIND 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_WIND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101302013.lua b/pre-release/c101302013.lua deleted file mode 100644 index 8abade161a..0000000000 --- a/pre-release/c101302013.lua +++ /dev/null @@ -1,54 +0,0 @@ ---絢嵐たるエルダム ---Magnifistorming Erdam ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, you can Special Summon this card (from your hand) - 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,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.selfspcon) - c:RegisterEffect(e1) - --Add 1 "Magnifistorm" monster or 1 "Mystical Space Typhoon" from your Deck to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) -end -s.listed_series={SET_MAGNIFISTORM} -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON,id} -function s.selfspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) - or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) -end -function s.thfilter(c) - return ((c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster()) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) and c:IsAbleToHand() and not c:IsCode(id) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -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/c101302014.lua b/pre-release/c101302014.lua deleted file mode 100644 index b5f232509a..0000000000 --- a/pre-release/c101302014.lua +++ /dev/null @@ -1,54 +0,0 @@ ---絢嵐たるスエン ---Magnifistorming Suen ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, you can Special Summon this card (from your hand) - 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,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.selfspcon) - c:RegisterEffect(e1) - --Add 1 "Magnifistorm" Spell/Trap or 1 "Mystical Space Typhoon" from your Deck to your hand - local e2a=Effect.CreateEffect(c) - e2a:SetDescription(aux.Stringid(id,1)) - e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2a:SetProperty(EFFECT_FLAG_DELAY) - e2a:SetCode(EVENT_SUMMON_SUCCESS) - e2a:SetCountLimit(1,{id,1}) - e2a:SetTarget(s.thtg) - e2a:SetOperation(s.thop) - c:RegisterEffect(e2a) - local e2b=e2a:Clone() - e2b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e2b) -end -s.listed_series={SET_MAGNIFISTORM} -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -function s.selfspcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) - or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) -end -function s.thfilter(c) - return ((c:IsSetCard(SET_MAGNIFISTORM) and c:IsSpellTrap()) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) 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/c101302015.lua b/pre-release/c101302015.lua deleted file mode 100644 index afc372648c..0000000000 --- a/pre-release/c101302015.lua +++ /dev/null @@ -1,89 +0,0 @@ ---絢嵐たるスエン ---Magnifistorming Crothea ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Cannot be destroyed by battle or card effects while your opponent controls no Spells/Traps - local e1a=Effect.CreateEffect(c) - e1a:SetType(EFFECT_TYPE_SINGLE) - e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1a:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1a:SetRange(LOCATION_MZONE) - e1a:SetCondition(function(e) return not Duel.IsExistingMatchingCard(Card.IsSpellTrap,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,1,nil) end) - e1a:SetValue(1) - c:RegisterEffect(e1a) - local e1b=e1a:Clone() - e1b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - c:RegisterEffect(e1b) - --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_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_HAND) - e2:SetCountLimit(1,id) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Add 1 "Magnifistorm" card and/or 1 "Mystical Space Typhoon" from your Deck and/or GY to your hand - local e3a=Effect.CreateEffect(c) - e3a:SetDescription(aux.Stringid(id,1)) - e3a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - 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_series={SET_MAGNIFISTORM} -s.listed_names={id,CARD_MYSTICAL_SPACE_TYPHOON} -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.thfilter(c) - return (c:IsSetCard(SET_MAGNIFISTORM) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) and c:IsAbleToHand() and not c:IsCode(id) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) -end -function s.rescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsSetCard,nil,SET_MAGNIFISTORM)<=1 and sg:FilterCount(Card.IsCode,nil,CARD_MYSTICAL_SPACE_TYPHOON)<=1 -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil) - if #g>0 then - local sg=aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon,1,tp,HINTMSG_ATOHAND) - if #sg>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end - end - --You cannot Special Summon for the rest of this turn, except WIND 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_WIND) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101302016.lua b/pre-release/c101302016.lua deleted file mode 100644 index edee6484a5..0000000000 --- a/pre-release/c101302016.lua +++ /dev/null @@ -1,69 +0,0 @@ ---絢嵐渦麗ヴァルルーン ---Magnifistorm Vortex Beauty Valrune ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Negate a monster effect activated by the opponent, then if you have 2 or more "Mystical Space Typhoon" in your GY, you can destroy that monster. - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.discon) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --Special Summon this card from your GY if "Mystical Space Typhoon" is activated - local e3=e1:Clone() - e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - c:RegisterEffect(e3) -end -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -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.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) - and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) -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) - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,re:GetHandler(),1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local rc=re:GetHandler() - if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) and rc:IsDestructable() - and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,2,nil,CARD_MYSTICAL_SPACE_TYPHOON) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.BreakEffect() - Duel.Destroy(eg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101302017.lua b/pre-release/c101302017.lua deleted file mode 100644 index b14388bfcc..0000000000 --- a/pre-release/c101302017.lua +++ /dev/null @@ -1,65 +0,0 @@ ---絢嵐豪火フォニクス ---Magnifistorm Great Pyre Phonix ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --Special Summon this card from your hand if a Quick-Play Spell Card is activated - 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_DELAY) - e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Shuffle up to 2 cards your opponent controls into 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_CARD_TARGET+EFFECT_FLAG_DELAY) - 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 re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) - c:RegisterEffect(e2) - --Special Summon this card from your GY if "Mystical Space Typhoon" is activated - local e3=e1:Clone() - e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) - e3:SetRange(LOCATION_GRAVE) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - c:RegisterEffect(e3) -end -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -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.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) 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,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,tp,0) -end -function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101302020.lua b/pre-release/c101302020.lua deleted file mode 100644 index 1ee6aab373..0000000000 --- a/pre-release/c101302020.lua +++ /dev/null @@ -1,95 +0,0 @@ ---ドレミコード・ソルフェージア ---Solfachord Solfeggia ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --Negate a monster effect activated by your opponent, then destroy this card - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAIN_SOLVING) - e1:SetRange(LOCATION_PZONE) - e1:SetCondition(s.discon) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --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) - e2:SetCondition(function(e,tp) return not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_SOLFACHORD)),tp,LOCATION_MZONE,0,1,nil) end) - e2:SetTarget(s.selfsptg) - e2:SetOperation(s.selfspop) - c:RegisterEffect(e2) - --Special Summon 1 "Solfachord" monster from your hand, except "Solfachord Solfeggia" - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_MZONE) - e3:SetCountLimit(1,{id,1}) - e3:SetTarget(s.sptg) - e3:SetOperation(s.spop) - c:RegisterEffect(e3) -end -s.listed_names={id} -s.listed_series={SET_GRANSOLFACHORD,SET_SOLFACHORD} -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) and not Duel.HasFlagEffect(tp,id) - and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GRANSOLFACHORD),tp,LOCATION_MZONE,0,1,nil) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,2)) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - Duel.Hint(HINT_CARD,0,id) - if Duel.NegateEffect(ev) then - Duel.BreakEffect() - Duel.Destroy(c,REASON_EFFECT) - end -end -function s.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.spfilter(c,e,tp,exc) - if not (c:IsSetCard(SET_SOLFACHORD) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - if c:IsLocation(LOCATION_HAND|LOCATION_GRAVE) then - return Duel.GetMZoneCount(tp,exc)>0 - elseif c:IsLocation(LOCATION_EXTRA) then - return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,exc,c)>0 - end -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local cost_chk=Cost.SelfTribute(e,tp,eg,ep,ev,re,r,rp,0) - local exc=cost_chk and e:GetHandler() or nil - local location=cost_chk and LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA or LOCATION_HAND - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,location,0,1,nil,e,tp,exc) end - local hand_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) - if cost_chk and (not hand_chk or Duel.SelectYesNo(tp,aux.Stringid(id,3))) then - Cost.SelfTribute(e,tp,eg,ep,ev,re,r,rp,1) - e:SetLabel(LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA) - else - e:SetLabel(LOCATION_HAND) - end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,e:GetLabel()) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,e:GetLabel(),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/c101302021.lua b/pre-release/c101302021.lua deleted file mode 100644 index a9783f4bed..0000000000 --- a/pre-release/c101302021.lua +++ /dev/null @@ -1,120 +0,0 @@ ---ドレミコード・プリモア ---Solfachord Primoria ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - Pendulum.AddProcedure(c) - --Return 1 "Solfachord" card in your Pendulum Zone to the hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_PZONE) - e1:SetCondition(function(e,tp,eg) return eg:IsExists(s.pendthconfilter,1,nil,tp) end) - e1:SetTarget(s.pendthtg) - e1:SetOperation(s.pendthop) - c:RegisterEffect(e1) - --While you have "Solfachord" cards with even and odd Pendulum Scales in your Pendulum Zone, your activated "Solfachord" cards' effects cannot be negated - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_DISEFFECT) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.immcon) - e2:SetValue(s.immval) - c:RegisterEffect(e2) - --Add 1 "Solfachord" card from your Deck to your hand, except "Solfachord Primoria" - local e3a=Effect.CreateEffect(c) - e3a:SetDescription(aux.Stringid(id,1)) - e3a:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3a:SetProperty(EFFECT_FLAG_DELAY) - e3a:SetCode(EVENT_SUMMON_SUCCESS) - e3a:SetCountLimit(1,id) - e3a:SetTarget(s.deckthtg) - e3a:SetOperation(s.deckthop) - c:RegisterEffect(e3a) - local e3b=e3a:Clone() - e3b:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3b) - --Add 1 "Solfachord" card from your GY or face-up Extra Deck to your hand - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetCategory(CATEGORY_TOHAND) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(function(e,tp,eg) return eg:IsExists(s.gyedthconfilter,1,nil,tp) end) - e4:SetTarget(s.gyedthtg) - e4:SetOperation(s.gyedthop) - c:RegisterEffect(e4) -end -s.listed_names={id} -s.listed_series={SET_SOLFACHORD} -function s.pendthconfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() -end -function s.pendthfilter(c) - return c:IsSetCard(SET_SOLFACHORD) and c:IsAbleToHand() -end -function s.pendthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_PZONE) and s.pendthfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.pendthfilter,tp,LOCATION_PZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.pendthfilter,tp,LOCATION_PZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) -end -function s.pendthop(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.immcon(e) - local g=Duel.GetMatchingGroup(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,nil,SET_SOLFACHORD) - local a,b=g:GetFirst(),g:GetNext() - return a and b and ((a:GetScale()+b:GetScale())%2==1) -end -function s.immval(e,ct) - local trig_player,trig_setcodes=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_SETCODES) - if trig_player==1-e:GetHandlerPlayer() then return false end - for _,setcode in ipairs(trig_setcodes) do - if (SET_SOLFACHORD&0xfff)==(setcode&0xfff) and (SET_SOLFACHORD&setcode)==SET_SOLFACHORD then return true end - end -end -function s.deckthfilter(c) - return c:IsSetCard(SET_SOLFACHORD) and not c:IsCode(id) and c:IsAbleToHand() -end -function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.deckthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.deckthfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.gyedthconfilter(c,tp) - return c:IsLinkSummoned() and c:IsSetCard(SET_SOLFACHORD) and c:IsSummonPlayer(tp) -end -function s.gyedthfilter(c) - return c:IsSetCard(SET_SOLFACHORD) and c:IsFaceup() and c:IsAbleToHand() -end -function s.gyedthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.gyedthfilter,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_EXTRA) -end -function s.gyedthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.gyedthfilter),tp,LOCATION_GRAVE|LOCATION_EXTRA,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/c101302033.lua b/pre-release/c101302033.lua deleted file mode 100644 index 36a5722bba..0000000000 --- a/pre-release/c101302033.lua +++ /dev/null @@ -1,65 +0,0 @@ ---メガリス・フローチュ ---Megalith Phuloch ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Add 1 "Megalith" card from your GY to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) - e1:SetCost(Cost.HardOncePerChain(id)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - local ritual_params={ - handler=c, - filter=function(c) return c:IsSetCard(SET_MEGALITH) and not c:IsCode(id) end, - lvtype=RITPROC_GREATER, - location=LOCATION_GRAVE, - forcedselection=function(e,tp,g,sc) return g:IsContains(e:GetHandler()) end - } - --Ritual Summon 1 "Megalith" Ritual Monster from your GY, by Tributing monsters from your hand or field, including this card on your field, whose total Levels equal or exceed the Level of the Ritual Monster - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - 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:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) - e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetCost(Cost.HardOncePerChain(id)) - e2:SetTarget(Ritual.Target(ritual_params)) - e2:SetOperation(s.ritop(Ritual.Operation(ritual_params))) - c:RegisterEffect(e2) -end -s.listed_series={SET_MEGALITH} -s.listed_names={id} -function s.thfilter(c) - return c:IsSetCard(SET_MEGALITH) 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.ritop(default_operation) - return function(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsControler(tp) then - default_operation(e,tp,eg,ep,ev,re,r,rp) - end - end -end diff --git a/pre-release/c101302034.lua b/pre-release/c101302034.lua deleted file mode 100644 index 40fb0171af..0000000000 --- a/pre-release/c101302034.lua +++ /dev/null @@ -1,85 +0,0 @@ ---メガリス・ノートラ・プルーラ ---Megalith Nortra Phulra ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - c:AddMustBeRitualSummoned() - --Apply a "this turn, your opponent cannot activate cards or effects in response to the activation of your "Megalith" Ritual Monsters' effects" effect - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e,tp) return not Duel.HasFlagEffect(tp,id) end) - e1:SetCost(Cost.SelfReveal) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Negate the activation of an opponent's card or effect, and if you do, destroy that card, then if that effect targeted a card(s) on the field, you can Tribute 1 monster your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_RELEASE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev) return ep==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) - e2:SetTarget(s.negtg) - e2:SetOperation(s.negop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MEGALITH} -s.mat_filter=Card.IsRitualMonster -function s.effop(e,tp,eg,ep,ev,re,r,rp) - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - local c=e:GetHandler() - aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) - --This turn, your opponent cannot activate cards or effects in response to the activation of your "Megalith" Ritual Monsters' effects - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_CHAINING) - e1:SetOperation(s.inactop) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.inactop(e,tp,eg,ep,ev,re,r,rp) - if ep==1-tp then return end - local trig_typ,trig_setcodes=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_SETCODES) - if trig_typ&(TYPE_RITUAL|TYPE_MONSTER)~=(TYPE_RITUAL|TYPE_MONSTER) then return end - for _,setcode in ipairs(trig_setcodes) do - if (SET_MEGALITH&0xfff)==(setcode&0xfff) and (SET_MEGALITH&setcode)==SET_MEGALITH then - return Duel.SetChainLimit(function(e,rp,tp) return rp==tp end) - end - end -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 - local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - if tg and tg:IsExists(Card.IsOnField,1,nil) then - e:SetLabel(100) - Duel.SetPossibleOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE) - else - e:SetLabel(0) - end -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) - and Duel.Destroy(eg,REASON_EFFECT)>0 and e:GetLabel()==100 - and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then - 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.BreakEffect() - Duel.Release(g,REASON_EFFECT) - end - end -end \ No newline at end of file diff --git a/pre-release/c101302036.lua b/pre-release/c101302036.lua deleted file mode 100644 index 058362801f..0000000000 --- a/pre-release/c101302036.lua +++ /dev/null @@ -1,65 +0,0 @@ ---剛鬼ザ・タイラント・オーガ ---Gouki The Tyrant Ogre ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Fusion Materials: 1 "Gouki" Link Monster + 1 Warrior, Dinosaur, or Cyberse monster - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR|RACE_DINOSAUR|RACE_CYBERSE)) - --Register the Link Rating of the materials used for its Fusion Summon - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE) - e0:SetCode(EFFECT_MATERIAL_CHECK) - e0:SetValue(s.valcheck) - c:RegisterEffect(e0) - --Destroy cards on the field up to the total Link Rating of the "Gouki" Link Monsters used as material - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e:GetLabel()>0 end) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - e0:SetLabelObject(e1) - --If this card battles, your opponent cannot activate cards or effects until the end of the Damage Step - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EFFECT_CANNOT_ACTIVATE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(0,1) - e2:SetValue(1) - e2:SetCondition(function(e) return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() end) - c:RegisterEffect(e2) -end -s.listed_series={SET_GOUKI} -function s.matfilter(c) - return c:IsSetCard(SET_GOUKI) and c:IsLinkMonster() -end -function s.valcheck(e,c) - local g=c:GetMaterial() - local total=g:Filter(Card.IsSetCard,nil,SET_GOUKI):GetSum(Card.GetLink) - local link3=g:IsExists(Card.IsLinkAbove,1,nil,3) and 100 or 0 - e:GetLabelObject():SetLabel(total,link3) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() end - if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - local total,link3=e:GetLabel() - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,total,nil) - if link3==100 then - Duel.SetChainLimit(function(te) return not Duel.GetTargetCards(e):IsContains(te:GetHandler()) end) - end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if #tg>0 then - Duel.Destroy(tg,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pre-release/c101302041.lua b/pre-release/c101302041.lua deleted file mode 100644 index 8f251719c5..0000000000 --- a/pre-release/c101302041.lua +++ /dev/null @@ -1,84 +0,0 @@ ---剛鬼ドラゴン・オーガ ---Gouki Dragon Ogre ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - --Add 1 "Gouki" 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_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e1:SetTarget(s.deckthtg) - e1:SetOperation(s.deckthop) - c:RegisterEffect(e1) - --Add 1 "Gouki" monster with lower ATK than a targeted EARTH monster you control 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_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_TO_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.gythtg) - e2:SetOperation(s.gythop) - c:RegisterEffect(e2) -end -s.listed_series={SET_GOUKI} -function s.deckthfilter(c) - return c:IsSetCard(SET_GOUKI) and c:IsSpell() and c:IsAbleToHand() -end -function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function s.deckthop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.deckthfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end -function s.earthfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup() - and Duel.IsExistingMatchingCard(s.gythfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetAttack()) -end -function s.gythfilter(c,atk) - return c:IsSetCard(SET_GOUKI) and c:IsMonster() and c:GetAttack()0 then - Duel.HintSelection(g) - Duel.SendtoHand(g,nil,REASON_EFFECT) - end - tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) - --Your opponent's monsters can only target that face-up monster on your field for attacks - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_ONLY_ATTACK_MONSTER) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) - e1:SetValue(function(e,c) return c==tc end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - tc:RegisterEffect(e1,true) - end -end \ No newline at end of file diff --git a/pre-release/c101302050.lua b/pre-release/c101302050.lua deleted file mode 100644 index d341bd7ce3..0000000000 --- a/pre-release/c101302050.lua +++ /dev/null @@ -1,74 +0,0 @@ ---剛鬼シーク・オーガ ---Gouki Sheik Ogre ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2 "Gouki" monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2,2) - --Special Summon any number of "Gouki" monsters from your hand with different Levels from each other - 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_DELAY) - e1:SetCode(EVENT_TO_HAND) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Fusion Summon 1 "Gouki" Fusion Monster from your Extra Deck, using monsters from your hand or field - local params={function(c) return c:IsSetCard(SET_GOUKI) end} - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(Fusion.SummonEffTG(params)) - e2:SetOperation(Fusion.SummonEffOP(params)) - c:RegisterEffect(e2) -end -s.listed_series={SET_GOUKI} -function s.spconfilter(c,tp) - return c:IsSetCard(SET_GOUKI) and c:IsMonster() and c:IsPreviousLocation(LOCATION_DECK) - and c:IsControler(tp) and not c:IsReason(REASON_DRAW) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.spconfilter,1,nil,tp) -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_GOUKI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 then return end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) - if #g==0 then return end - ft=math.min(ft,#g) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dpcheck(Card.GetLevel),1,tp,HINTMSG_SPSUMMON) - if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then - for sc in sg:Iter() do - sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) - --You cannot Special Summon, except "Gouki" monsters, while you control any 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+EFFECT_FLAG_UNCOPYABLE) - 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 not c:IsSetCard(SET_GOUKI) end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD) - sc:RegisterEffect(e1,true) - end - end -end \ No newline at end of file diff --git a/pre-release/c101302056.lua b/pre-release/c101302056.lua deleted file mode 100644 index 4862868f03..0000000000 --- a/pre-release/c101302056.lua +++ /dev/null @@ -1,75 +0,0 @@ ---剛鬼闘魂 ---Gouki Fighting Spirit ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - --When this card is activated: You can Special Summon 1 Level 4 or lower EARTH monster (Warrior, Dinosaur, or Cyberse) from your hand in Defense Position - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) - --Special Summon 1 "Dinowrestler" or "G Golem" monster from your Deck or Extra Deck - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.deckexspcost) - e2:SetTarget(s.deckexsptg) - e2:SetOperation(s.deckexspop) - c:RegisterEffect(e2) -end -s.listed_series={SET_GOUKI,SET_DINOWRESTLER,SET_G_GOLEM} -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) -end -function s.handspfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR|RACE_DINOSAUR|RACE_CYBERSE) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(s.handspfilter,tp,LOCATION_HAND,0,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.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end - end -end -function s.deckexcostfilter(c,e,tp) - return c:IsLinkAbove(3) and c:IsSetCard(SET_GOUKI) - and Duel.IsExistingMatchingCard(s.deckexspfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,c) -end -function s.deckexspfilter(c,e,tp,cost_card) - if not (c:IsSetCard({SET_DINOWRESTLER,SET_G_GOLEM}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - if c:IsLocation(LOCATION_DECK) then - return Duel.GetMZoneCount(tp,cost_card)>0 - elseif c:IsLocation(LOCATION_EXTRA) then - return Duel.GetLocationCountFromEx(tp,tp,cost_card,c)>0 - end -end -function s.deckexspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.deckexcostfilter,1,false,nil,nil,e,tp) end - local g=Duel.SelectReleaseGroupCost(tp,s.deckexcostfilter,1,1,false,nil,nil,e,tp) - Duel.Release(g,REASON_COST) -end -function s.deckexsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.deckexspop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.deckexspfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end \ No newline at end of file diff --git a/pre-release/c101302061.lua b/pre-release/c101302061.lua deleted file mode 100644 index f86aad1ed9..0000000000 --- a/pre-release/c101302061.lua +++ /dev/null @@ -1,84 +0,0 @@ ---絢嵐たる献詠 ---Magnifistorming Stanza Tribute ---scripted by Naim -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_SEARCH+CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Set this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -s.listed_series={SET_MAGNIFISTORM} -function s.thfilter1(c) - return c:IsLevelBelow(4) and c:IsSetCard(SET_MAGNIFISTORM) and c:IsAbleToHand() -end -function s.thfilter2(c) - return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) and not Duel.HasFlagEffect(tp,id) - local b2=Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) 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,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - elseif op==2 then - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Add 1 Level 4 or lower "Magnifistorm" monster from your Deck to your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter1,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - elseif op==2 then - --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsSSetable() end - if c:IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) - end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SSet(tp,c) - end -end diff --git a/pre-release/c101302062.lua b/pre-release/c101302062.lua deleted file mode 100644 index ebf57437bf..0000000000 --- a/pre-release/c101302062.lua +++ /dev/null @@ -1,84 +0,0 @@ ---絢嵐たる顕現 ---Magnifistorming Summoning Technique ---scripted by Naim -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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Set this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -s.listed_series={SET_MAGNIFISTORM} -function s.tgfilter(c) - return c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster() and c:IsAbleToGrave() -end -function s.thfilter(c) - return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) and not Duel.HasFlagEffect(tp,id) - local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) 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,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_TOGRAVE) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - elseif op==2 then - e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Send 1 "Magnifistorm" monster 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 - elseif op==2 then - --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsSSetable() end - if c:IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) - end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SSet(tp,c) - end -end diff --git a/pre-release/c101302063.lua b/pre-release/c101302063.lua deleted file mode 100644 index f682f289f3..0000000000 --- a/pre-release/c101302063.lua +++ /dev/null @@ -1,97 +0,0 @@ ---絢嵐たる見神 ---Magnifistorming Sight Trance ---scripted by Naim -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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Set this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_DESTROYED) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - e2:SetTarget(s.settg) - e2:SetOperation(s.setop) - c:RegisterEffect(e2) -end -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -s.listed_series={SET_MAGNIFISTORM} -function s.tgfilter(c) - return c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster() and c:IsAbleToGrave() -end -function s.thfilter(c) - return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsPlayerCanDraw(tp,2) and not Duel.HasFlagEffect(tp,id) - local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) 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,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,2) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1) - elseif op==2 then - e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) - end -end -function s.discardfilter(c) - return (c:IsSetCard(SET_MAGNIFISTORM) or c:IsQuickPlaySpell()) and c:IsDiscardable(REASON_EFFECT) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Draw 2 cards, then discard 1 "Magnifistorm" card or 1 Quick-Play Spell, or, if you do not have any in your hand, discard your entire hand - if Duel.Draw(tp,2,REASON_EFFECT)>0 then - Duel.ShuffleHand(tp) - Duel.BreakEffect() - local handg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - if handg:IsExists(s.discardfilter,1,nil) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - local dg=handg:FilterSelect(tp,s.discardfilter,1,1,nil) - if #dg>0 then - Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) - end - else - Duel.SendtoGrave(handg,REASON_EFFECT|REASON_DISCARD) - end - end - elseif op==2 then - --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end - end -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsSSetable() end - if c:IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) - end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SSet(tp,c) - end -end \ No newline at end of file diff --git a/pre-release/c101302065.lua b/pre-release/c101302065.lua deleted file mode 100644 index 1b968a6e77..0000000000 --- a/pre-release/c101302065.lua +++ /dev/null @@ -1,85 +0,0 @@ ---幸せの多重奏 ---Solfachord Happiness ---Scripted by Hatter -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) - c:RegisterEffect(e1) -end -s.listed_names={id} -s.listed_series={SET_SOLFACHORD} -function s.thfilter(c) - return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler(),REASON_EFFECT) - and Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil):GetClassCount(Card.GetScale)>=2 - local b2=not Duel.HasFlagEffect(tp,id+200) - and Pendulum.PlayerCanGainAdditionalPendulumSummon(tp,id) - local b3=not Duel.HasFlagEffect(tp,id+300) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 - and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_PZONE,0,2,nil,e,tp) - if chk==0 then return b1 or b2 or b3 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,1)}, - {b2,aux.Stringid(id,2)}, - {b3,aux.Stringid(id,3)}) - e:SetLabel(op) - Duel.RegisterFlagEffect(tp,id+op*100,RESET_PHASE|PHASE_END,0,1) - if op==1 then - e:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND+CATEGORY_SEARCH) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - elseif op==2 then - e:SetCategory(0) - elseif op==3 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_PZONE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Discard 1 card, and if you do, add 2 "Solfachord" Pendulum Monsters with different Pendulum Scales from your Deck to your hand - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)==0 then return end - local dg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - local sdg=aux.SelectUnselectGroup(dg,e,tp,2,2,aux.dpcheck(Card.GetScale),1,tp,HINTMSG_ATOHAND) - if #sdg~=2 or Duel.SendtoHand(sdg,nil,REASON_EFFECT)~=2 then return end - Duel.ConfirmCards(1-tp,sdg:Match(Card.IsLocation,nil,LOCATION_HAND)) - Duel.ShuffleHand(tp) - local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ct==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,4)) then return end - ct=math.min(ct,Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)+1) - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local shg=hg:Select(tp,1,ct,nil) - if #shg>0 then - Duel.BreakEffect() - Duel.SpecialSummon(shg,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - --During your Main Phase this turn, you can conduct 1 Pendulum Summon of a "Solfachord" monster(s) in addition to your Pendulum Summon - Pendulum.GrantAdditionalPendulumSummon(e:GetHandler(),function(c) return c:IsSetCard(SET_SOLFACHORD) end,tp,LOCATION_HAND|LOCATION_EXTRA,aux.Stringid(id,5),aux.Stringid(id,6),id) - elseif op==3 then - --Special Summon 2 "Solfachord" cards from your Pendulum Zone - if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_PZONE,0,nil,e,tp) - if #g==2 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/c101302066.lua b/pre-release/c101302066.lua deleted file mode 100644 index ec3cab8c80..0000000000 --- a/pre-release/c101302066.lua +++ /dev/null @@ -1,103 +0,0 @@ ---メガリス・アナスタシス ---Megalith Anastasis ---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) - --Add 2 "Megalith" monsters (1 Level 4 or lower and 1 Level 8 or higher) 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_SZONE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.Discard()) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1) - --Activate 1 of these effects - 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_SPSUMMON_SUCCESS) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(s.effcon) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_MEGALITH} -function s.thfilter(c) - return (c:IsLevelBelow(4) or c:IsLevelAbove(8)) and c:IsSetCard(SET_MEGALITH) and c:IsAbleToHand() -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsLevelBelow,1,nil,4) and sg:IsExists(Card.IsLevelAbove,1,nil,8) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) - end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if #g==0 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_ATOHAND) - if #sg>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) - end -end -function s.effconfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsRitualSummoned() and c:IsSetCard(SET_MEGALITH) and c:IsFaceup() -end -function s.effcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.effconfilter,1,nil,tp) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=not Duel.HasFlagEffect(tp,id) - and Duel.IsPlayerCanDraw(tp,2) - local b2=not Duel.HasFlagEffect(tp,id+100) - and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,2) - Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1) - elseif op==2 then - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) - e:SetCategory(CATEGORY_RELEASE) - Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local op=e:GetLabel() - if op==1 then - --Draw 2 cards, then discard 1 card - if Duel.Draw(tp,2,REASON_EFFECT)==2 then - Duel.ShuffleHand(tp) - Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) - end - elseif op==2 then - --Tribute 1 monster your opponent controls - 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 -end \ No newline at end of file diff --git a/pre-release/c101302076.lua b/pre-release/c101302076.lua deleted file mode 100644 index 565395848d..0000000000 --- a/pre-release/c101302076.lua +++ /dev/null @@ -1,122 +0,0 @@ ---絢嵐たる権能 ---Magnifistorming Sovereign Tyranny ---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) - --Apply these effects in sequence - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_SZONE) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1) - e1:SetCondition(aux.StatChangeDamageStepCondition) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Negate the effects 1 face-up card your opponent controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --Set this card - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,id) - e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) - e3:SetTarget(s.settg) - e3:SetOperation(s.setop) - c:RegisterEffect(e3) -end -s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} -s.listed_series={SET_MAGNIFISTORM} -function s.tdfilter(c,e) - return c:IsQuickPlaySpell() and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsSetCard,1,nil,SET_MAGNIFISTORM) -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return false end - local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil,e) - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and #g>=3 and g:IsExists(Card.IsSetCard,1,nil,SET_MAGNIFISTORM) - end - local tg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TODECK) - Duel.SetTargetCard(tg) - Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,tp,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,nil,0,tp,300) - Duel.SetPossibleOperationInfo(0,CATEGORY_DEFCHANGE,nil,0,tp,300) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local break_chk=false - local tg=Duel.GetTargetCards(e) - if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then - break_chk=true - Duel.ShuffleDeck(tp) - Duel.BreakEffect() - Duel.Draw(tp,1,REASON_EFFECT) - end - if break_chk then Duel.BreakEffect() end - local c=e:GetHandler() - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3)) - --WIND monsters you control will gain 300 ATK/DEF for the rest of this turn - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsAttribute(ATTRIBUTE_WIND) end) - e1:SetValue(300) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENSE) - Duel.RegisterEffect(e2,tp) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c:IsControler(1-tp) and chkc:IsNegatable() end - if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) - local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() then - --Negate its effects - tc:NegateEffects(e:GetHandler(),nil,true) - end -end -function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsSSetable() end - if c:IsLocation(LOCATION_GRAVE) then - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) - end -end -function s.setop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.SSet(tp,c) - end -end diff --git a/pre-release/c101302101.lua b/pre-release/c101302101.lua deleted file mode 100644 index aef09c86fb..0000000000 --- a/pre-release/c101302101.lua +++ /dev/null @@ -1,78 +0,0 @@ ---DDランス・ソルジャー ---D/D Lance Soldier ---Scripted by Hatter -local s,id=GetID() -function s.initial_effect(c) - --Increase the Level of 1 "D/D" monster you control by up to the number of "Dark Contract" cards in your field and GY - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_LVCHANGE) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.lvtg) - e1:SetOperation(s.lvop) - c:RegisterEffect(e1) - --Destroy 1 "Dark Contract" card you control, and if you do, Special Summon this card - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_GRAVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD,SET_DARK_CONTRACT} -function s.lvfilter(c) - return c:IsSetCard(SET_DD) and c:HasLevel() and c:IsFaceup() -end -function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:HasLevel() then return end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) - if ct==0 then return end - local lv=Duel.AnnounceLevel(tp,1,ct) - if lv then - tc:UpdateLevel(lv,nil,e:GetHandler()) - end -end -function s.desfilter(c,tp) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 -end -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 s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) - and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --Banish it when it leaves the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(3300) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT|RESETS_REDIRECT) - c:RegisterEffect(e1,true) - end -end \ No newline at end of file diff --git a/pre-release/c101302102.lua b/pre-release/c101302102.lua deleted file mode 100644 index e331afd54a..0000000000 --- a/pre-release/c101302102.lua +++ /dev/null @@ -1,102 +0,0 @@ ---DDディフェンス・ソルジャー ---D/D Defense Soldier ---Scripted by Hatter -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_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.efftg) - e1:SetOperation(s.effop) - c:RegisterEffect(e1) - --Add 1 "D/D" Pendulum Monster from your face-up Extra Deck or 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:SetCost(Cost.SelfBanish) - e2:SetTarget(s.thtg) - e2:SetOperation(s.thop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD,SET_DDD} -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.limcostfilter(c) - return c:IsSetCard(SET_DD) and c:IsMonster() and c:IsAbleToRemoveAsCost() -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) - local b2=not Duel.HasFlagEffect(tp,id) - and Duel.IsExistingMatchingCard(s.limcostfilter,tp,LOCATION_GRAVE,0,1,nil) - if chk==0 then return b1 or b2 end - local op=Duel.SelectEffect(tp, - {b1,aux.Stringid(id,2)}, - {b2,aux.Stringid(id,3)}) - e:SetLabel(op) - if op==1 then - e:SetCategory(CATEGORY_SPECIAL_SUMMON) - e:SetProperty(EFFECT_FLAG_CARD_TARGET) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) - elseif op==2 then - e:SetCategory(0) - e:SetProperty(0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.limcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_COST) - end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) - local op=e:GetLabel() - if op==1 then - --Special Summon 1 "D/D" card in your Pendulum Zone - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end - elseif op==2 then - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - --If your "D/D/D" monster attacks this turn, your opponent cannot activate cards or effects until the end of the Damage Step - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetDescription(aux.Stringid(id,4)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0,1) - e1:SetCondition(s.actcon) - e1:SetValue(1) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) - end -end -function s.actcon(e) - local tc=Duel.GetAttacker() - return tc and tc:IsSetCard(SET_DDD) and tc:IsControler(e:GetHandlerPlayer()) -end -function s.thfilter(c) - return c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsAbleToHand() -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) -end -function s.thop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end -end \ No newline at end of file diff --git a/pre-release/c101302103.lua b/pre-release/c101302103.lua deleted file mode 100644 index 98f9147c64..0000000000 --- a/pre-release/c101302103.lua +++ /dev/null @@ -1,104 +0,0 @@ ---DDD零死王ゼロ・マキナ ---D/D/D Zero Demise King Zero Machinex ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - --Pendulum Summon procedure - Pendulum.AddProcedure(c,false) - --Check if it was activated this turn - local e0=Effect.CreateEffect(c) - e0:SetDescription(1160) - e0:SetType(EFFECT_TYPE_ACTIVATE) - e0:SetCode(EVENT_FREE_CHAIN) - e0:SetRange(LOCATION_HAND) - e0:SetCost(s.actreg) - c:RegisterEffect(e0) - --Place 1 "Dark Contract" Continuous Spell/Trap on the field - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) - e1:SetTarget(s.pltg) - e1:SetOperation(s.plop) - c:RegisterEffect(e1) - --Special Summon this card from the Extra Deck if a "Dark Contract" or "D/D/D" card(s) is destroyed - 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+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_EXTRA) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) - c:RegisterEffect(e2) - --Place this card in the Pendulum Zone if it's destroyed - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_DESTROYED) - e3:SetCountLimit(1,{id,2}) - e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) - e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) - e3:SetOperation(s.penop) - c:RegisterEffect(e3) -end -s.listed_series={SET_DARK_CONTRACT,SET_DDD} -s.listed_names={id} -function s.actreg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) -end -function s.plfilter(c,tp) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsContinuousSpellTrap() and not c:IsForbidden() and c:CheckUniqueOnField(tp) -end -function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) 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_DECK,0,1,1,nil,tp):GetFirst() - if sc then - Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end -end -function s.spconfilter(c,tp) - return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and not c:IsPreviousCodeOnField(id) - and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard({SET_DDD,SET_DARK_CONTRACT}) -end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spconfilter,1,nil,tp) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,c)>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,PLAYER_EITHER,LOCATION_ONFIELD) -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(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - 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,LOCATION_ONFIELD,1,1,nil) - if #g>0 then - Duel.HintSelection(g) - Duel.BreakEffect() - Duel.Destroy(g,REASON_EFFECT) - end - end -end -function s.penop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) - end -end \ No newline at end of file diff --git a/pre-release/c101302104.lua b/pre-release/c101302104.lua deleted file mode 100644 index 73710e3b3b..0000000000 --- a/pre-release/c101302104.lua +++ /dev/null @@ -1,171 +0,0 @@ ---DDDD偉次元王アーク・クライシス ---D/D/D/D Great Dimension King Arc Crisis ---Scripted by The Razgriz -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Pendulum Summon procedure - Pendulum.AddProcedure(c,false) - --Fusion Materials: 4 Fiend monsters (1 Fusion, 1 Synchro, 1 Xyz, 1 Pendulum) - Fusion.AddProcMix(c,true,true,s.matfilter(TYPE_FUSION),s.matfilter(TYPE_SYNCHRO),s.matfilter(TYPE_XYZ),s.matfilter(TYPE_PENDULUM)) - --Special Summon this card (from your Extra Deck) by banishing the above materials from your field and/or GY - Fusion.AddContactProc(c,s.contactfil,s.contactop,false) - c:AddMustBeFusionSummoned() - --You can only Fusion Summon or Special Summon by its alternate procedure "D/D/D/D Great Dimension King Arc Crisis" once per turn - local e0=Effect.CreateEffect(c) - e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetCode(EVENT_SPSUMMON_SUCCESS) - e0:SetCondition(s.regcon) - e0:SetOperation(s.regop) - c:RegisterEffect(e0) - --Destroy "Dark Contract" cards you control to Special Summon "Doom King" monsters from your Deck/Extra Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_PZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --Negate the effects of all face-up monsters your opponent currently controls - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DISABLE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.distg) - e2:SetOperation(s.disop) - c:RegisterEffect(e2) - --Can attack all monsters your opponent controls once each - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_ATTACK_ALL) - e3:SetValue(1) - c:RegisterEffect(e3) - --Place this card in your Pendulum Zone - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,2)) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCode(EVENT_DESTROYED) - e4:SetCountLimit(1,{id,2}) - e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) - e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) - e4:SetOperation(s.penop) - c:RegisterEffect(e4) -end -s.listed_series={SET_DARK_CONTRACT,SET_DOOM_KING} -s.miracle_synchro_fusion=true -function s.matfilter(typ) - return function(c,fc,sumtype,tp) - return c:IsRace(RACE_FIEND,fc,sumtype,tp) and c:IsType(typ,fc,sumtype,tp) - end -end -function s.contactfil(tp) - local loc=LOCATION_ONFIELD|LOCATION_GRAVE - if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then loc=LOCATION_ONFIELD end - return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,loc,0,nil) -end -function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) -end -function s.regcon(e) - local c=e:GetHandler() - return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) -end -function s.regop(e,tp,eg,ep,ev,re,r,rp) - --Prevent another Fusion Summon or Special Summon by its alternate procedure of "Dark Magician of Destruction" that turn - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCode(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.desfilter(c,e,tp) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,dc) -end -function s.spfilter(c,e,tp,dc) - if not (c:IsSetCard(SET_DOOM_KING) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end - return (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,dc)>0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,dc,c)>0) -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCountFromEx(tp,tp) - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsFaceup() and s.desfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end - local ct=Duel.GetMatchingGroupCount(s.desfilter,tp,LOCATION_ONFIELD,0,nil,e,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,ct,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) -end -function s.rescon(mmz_ct,linkmz_ct) - return function(sg,e,tp,mg) - return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=mmz_ct - and sg:FilterCount(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil)<=linkmz_ct - end -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetTargetCards(e) - if tg==0 then return end - local ct=Duel.Destroy(tg,REASON_EFFECT) - if ct==0 then return end - local mmz_ct=Duel.GetLocationCount(tp,LOCATION_MZONE) - local emz_ct=Duel.GetLocationCountFromEx(tp,tp,nil,nil,ZONES_EMZ) - local linkmz_ct=Duel.GetLocationCountFromEx(tp,tp) - local ft=math.min(mmz_ct+emz_ct,ct) - if ft<=0 then return end - if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp) - if #g==0 then return end - local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) - if #sg==0 then return end - local fup,fdown=sg:Split(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil) - local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) - local priority_0,priority_1 - if linkmz_ct0 - and Duel.IsExistingTarget(s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end -function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.HasFlagEffect(tp,id) end -end -function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) - if Duel.HasFlagEffect(tp,id) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) - --If your "D/D" monster attacks a Defense Position monster this turn, inflict piercing battle damage to your opponent - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_PIERCE) - e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(SET_DD) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end \ No newline at end of file diff --git a/pre-release/c101302106.lua b/pre-release/c101302106.lua deleted file mode 100644 index 1c2bff4300..0000000000 --- a/pre-release/c101302106.lua +++ /dev/null @@ -1,85 +0,0 @@ ---DDD智慧王ソロモン ---D/D/D Wisdom King Solomon ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Xyz Summon procedure: 2 Level 4 "D/D" monsters - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),4,2) - --Add 1 "D/D" card from your Deck to your hand - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,id) - e1:SetCost(Cost.Detach(1)) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) - c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) - --A targeted "D/D" Effect Monster gains an effect until the end of this turn - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetCode(EVENT_REMOVE) - e2:SetCountLimit(1,{id,1}) - e2:SetTarget(s.efftg) - e2:SetOperation(s.effop) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD} -function s.thfilter(c) - return c:IsSetCard(SET_DD) 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.tgfilter(c) - return c:IsSetCard(SET_DD) and c:IsType(TYPE_EFFECT) and c:IsFaceup() -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_MZONE) and s.tgfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) -end -function s.effop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then - tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) - --Inflict damage to your opponent equal to the original ATK of a monster this card destroys a monster by battle - local e1=Effect.CreateEffect(tc) - e1:SetDescription(aux.Stringid(id,3)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCondition(aux.bdcon) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - e1:SetReset(RESETS_STANDARD_PHASE_END) - tc:RegisterEffect(e1) - end -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() - if dam<0 then dam=0 end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(dam) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end \ No newline at end of file diff --git a/pre-release/c101302107.lua b/pre-release/c101302107.lua deleted file mode 100644 index d33e3a2283..0000000000 --- a/pre-release/c101302107.lua +++ /dev/null @@ -1,70 +0,0 @@ ---DDD天空王ゼウス・ラグナロク ---D/D/D Sky King Zeus Ragnarok ---scripted by Naim -local s,id=GetID() -function s.initial_effect(c) - c:EnableReviveLimit() - --Link Summon procedure: 2+ "D/D" monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),2) - --Destroy 1 "D/D" or "Dark Contract" card you control, also, you can conduct 1 Pendulum Summon of a "D/D" monster(s) in addition to your Pendulum Summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --Negate the activation of monster effect your opponent activates in the hand - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_NEGATE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,id) - e2:SetCondition(s.negcon) - e2:SetCost(s.negcost) - e2:SetTarget(s.negtg) - e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) end) - c:RegisterEffect(e2) -end -s.listed_series={SET_DD,SET_DARK_CONTRACT} -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsSetCard({SET_DD,SET_DARK_CONTRACT}) and chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return not Duel.HasFlagEffect(tp,id) --pending rulings on whether you can use this effect if you've already performed an extra Pendulum Summon or not - and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - Pendulum.GrantAdditionalPendulumSummon(e:GetHandler(),function(c) return c:IsSetCard(SET_DD) end,tp,LOCATION_HAND|LOCATION_EXTRA,aux.Stringid(id,2),aux.Stringid(id,3),id) -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return ep==1-tp and re:IsMonsterEffect() and trig_loc==LOCATION_HAND - and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) -end -function s.negcostfilter(c) - return (c:IsSetCard(SET_DARK_CONTRACT) or (c:IsSetCard(SET_DD) and c:IsMonster())) and c:IsAbleToRemoveAsCost() -end -function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsSetCard,1,nil,SET_DARK_CONTRACT) and sg:IsExists(function(c) return c:IsSetCard(SET_DD) and c:IsMonster() end,1,nil) -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.negcostfilter,tp,LOCATION_GRAVE,0,nil) - if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end - local rg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE) - Duel.Remove(rg,POS_FACEUP,REASON_COST) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) -end \ No newline at end of file diff --git a/pre-release/c101302108.lua b/pre-release/c101302108.lua deleted file mode 100644 index f860d7103f..0000000000 --- a/pre-release/c101302108.lua +++ /dev/null @@ -1,81 +0,0 @@ ---零王の契約書 ---Dark Contract with the Zero King ---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) - --Destroy 1 "DD" card you control, except "Dark Contract with the Zero King", and if you do, Special Summon 1 "D/D" monster from your Deck - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1,id) - e1:SetTarget(s.destg) - e1:SetOperation(s.desop) - c:RegisterEffect(e1) - --Take 1000 damage - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE|PHASE_STANDBY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1) - e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e2:SetTarget(s.damtg) - e2:SetOperation(s.damop) - c:RegisterEffect(e2) -end -s.listed_names={id} -s.listed_series={SET_DD} -function s.desfilter(c,tp) - return c:IsSetCard(SET_DD) and not c:IsCode(id) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 -end -function s.spfilter(c,e,tp) - return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end - end - --You cannot Special Summon for the rest of this turn, except "D/D" 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:IsSetCard(SET_DD) end) - e1:SetReset(RESET_PHASE|PHASE_END) - Duel.RegisterEffect(e1,tp) -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,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/c101302109.lua b/pre-release/c101302109.lua deleted file mode 100644 index a30b3256ec..0000000000 --- a/pre-release/c101302109.lua +++ /dev/null @@ -1,95 +0,0 @@ ---異次元の契約書 ---Dark Contract with the Different Dimension ---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) - --Take 1000 damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE|PHASE_STANDBY) - e1:SetRange(LOCATION_SZONE) - e1:SetCountLimit(1) - e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - c:RegisterEffect(e1) - --Banish 1 card in your opponent's field or GY - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_SZONE) - e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCountLimit(1,id) - e2:SetCost(s.rmcost) - e2:SetTarget(s.rmtg) - e2:SetOperation(s.rmop) - c:RegisterEffect(e2) - --Gain 500 LP - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) - e3:SetCategory(CATEGORY_RECOVER) - 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.lptg) - e3:SetOperation(s.lpop) - c:RegisterEffect(e3) -end -s.listed_series={SET_DARK_CONTRACT} -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,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 -function s.rmcostfilter(c) - return c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToDeckAsCost() -end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmcostfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.rmcostfilter,tp,LOCATION_GRAVE,0,2,2,nil) - Duel.HintSelection(g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) -end -function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) -end -function s.rmop(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.lptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(500) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,500) -end -function s.lpop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - if Duel.Recover(p,d,REASON_EFFECT)>0 and rp==1-tp and r&REASON_EFFECT>0 then - Duel.BreakEffect() - Duel.Recover(p,500,REASON_EFFECT) - end -end \ No newline at end of file From e0a2e302b89faee68b582a00801cc48b54b56e35 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 29 Jun 2025 13:25:03 +0300 Subject: [PATCH 2/2] Add files via upload --- official/c10808715.lua | 69 +++++++++++++++ official/c11161666.lua | 106 +++++++++++++++++++++++ official/c22283204.lua | 60 +++++++++++++ official/c57566760.lua | 63 ++++++++++++++ official/c58288218.lua | 91 ++++++++++++++++++++ official/c59400890.lua | 107 +++++++++++++++++++++++ official/c71440209.lua | 94 ++++++++++++++++++++ official/c84550369.lua | 85 ++++++++++++++++++ official/c85672957.lua | 77 +++++++++++++++++ official/c85899505.lua | 86 +++++++++++++++++++ pre-release/c100201001.lua | 42 +++++++++ pre-release/c100201002.lua | 31 +++++++ pre-release/c100201003.lua | 56 ++++++++++++ pre-release/c100443001.lua | 78 +++++++++++++++++ pre-release/c100443003.lua | 80 +++++++++++++++++ pre-release/c100443005.lua | 39 +++++++++ pre-release/c100443007.lua | 91 ++++++++++++++++++++ pre-release/c100443010.lua | 67 +++++++++++++++ pre-release/c100443101.lua | 101 ++++++++++++++++++++++ pre-release/c100443102.lua | 63 ++++++++++++++ pre-release/c100443103.lua | 66 ++++++++++++++ pre-release/c100443104.lua | 76 +++++++++++++++++ pre-release/c100443105.lua | 37 ++++++++ pre-release/c101301081.lua | 78 +++++++++++++++++ pre-release/c101301082.lua | 86 +++++++++++++++++++ pre-release/c101301083.lua | 48 +++++++++++ pre-release/c101301084.lua | 64 ++++++++++++++ pre-release/c101301085.lua | 93 ++++++++++++++++++++ pre-release/c101301086.lua | 85 ++++++++++++++++++ pre-release/c101301087.lua | 98 +++++++++++++++++++++ pre-release/c101301088.lua | 81 ++++++++++++++++++ pre-release/c101301089.lua | 72 ++++++++++++++++ pre-release/c101301090.lua | 59 +++++++++++++ pre-release/c101301091.lua | 62 ++++++++++++++ pre-release/c101301092.lua | 61 +++++++++++++ pre-release/c101301093.lua | 86 +++++++++++++++++++ pre-release/c101301094.lua | 69 +++++++++++++++ pre-release/c101301095.lua | 83 ++++++++++++++++++ pre-release/c101301096.lua | 69 +++++++++++++++ pre-release/c101302006.lua | 91 ++++++++++++++++++++ pre-release/c101302012.lua | 70 +++++++++++++++ pre-release/c101302013.lua | 54 ++++++++++++ pre-release/c101302014.lua | 54 ++++++++++++ pre-release/c101302015.lua | 89 +++++++++++++++++++ pre-release/c101302016.lua | 69 +++++++++++++++ pre-release/c101302017.lua | 65 ++++++++++++++ pre-release/c101302020.lua | 95 +++++++++++++++++++++ pre-release/c101302021.lua | 120 ++++++++++++++++++++++++++ pre-release/c101302033.lua | 65 ++++++++++++++ pre-release/c101302034.lua | 85 ++++++++++++++++++ pre-release/c101302036.lua | 65 ++++++++++++++ pre-release/c101302041.lua | 84 ++++++++++++++++++ pre-release/c101302050.lua | 74 ++++++++++++++++ pre-release/c101302056.lua | 75 ++++++++++++++++ pre-release/c101302061.lua | 84 ++++++++++++++++++ pre-release/c101302062.lua | 84 ++++++++++++++++++ pre-release/c101302063.lua | 97 +++++++++++++++++++++ pre-release/c101302065.lua | 85 ++++++++++++++++++ pre-release/c101302066.lua | 103 ++++++++++++++++++++++ pre-release/c101302076.lua | 122 ++++++++++++++++++++++++++ pre-release/c101302101.lua | 78 +++++++++++++++++ pre-release/c101302102.lua | 102 ++++++++++++++++++++++ pre-release/c101302103.lua | 104 ++++++++++++++++++++++ pre-release/c101302104.lua | 171 +++++++++++++++++++++++++++++++++++++ pre-release/c101302105.lua | 64 ++++++++++++++ pre-release/c101302106.lua | 85 ++++++++++++++++++ pre-release/c101302107.lua | 70 +++++++++++++++ pre-release/c101302108.lua | 81 ++++++++++++++++++ pre-release/c101302109.lua | 95 +++++++++++++++++++++ 69 files changed, 5439 insertions(+) create mode 100644 official/c10808715.lua create mode 100644 official/c11161666.lua create mode 100644 official/c22283204.lua create mode 100644 official/c57566760.lua create mode 100644 official/c58288218.lua create mode 100644 official/c59400890.lua create mode 100644 official/c71440209.lua create mode 100644 official/c84550369.lua create mode 100644 official/c85672957.lua create mode 100644 official/c85899505.lua create mode 100644 pre-release/c100201001.lua create mode 100644 pre-release/c100201002.lua create mode 100644 pre-release/c100201003.lua create mode 100644 pre-release/c100443001.lua create mode 100644 pre-release/c100443003.lua create mode 100644 pre-release/c100443005.lua create mode 100644 pre-release/c100443007.lua create mode 100644 pre-release/c100443010.lua create mode 100644 pre-release/c100443101.lua create mode 100644 pre-release/c100443102.lua create mode 100644 pre-release/c100443103.lua create mode 100644 pre-release/c100443104.lua create mode 100644 pre-release/c100443105.lua create mode 100644 pre-release/c101301081.lua create mode 100644 pre-release/c101301082.lua create mode 100644 pre-release/c101301083.lua create mode 100644 pre-release/c101301084.lua create mode 100644 pre-release/c101301085.lua create mode 100644 pre-release/c101301086.lua create mode 100644 pre-release/c101301087.lua create mode 100644 pre-release/c101301088.lua create mode 100644 pre-release/c101301089.lua create mode 100644 pre-release/c101301090.lua create mode 100644 pre-release/c101301091.lua create mode 100644 pre-release/c101301092.lua create mode 100644 pre-release/c101301093.lua create mode 100644 pre-release/c101301094.lua create mode 100644 pre-release/c101301095.lua create mode 100644 pre-release/c101301096.lua create mode 100644 pre-release/c101302006.lua create mode 100644 pre-release/c101302012.lua create mode 100644 pre-release/c101302013.lua create mode 100644 pre-release/c101302014.lua create mode 100644 pre-release/c101302015.lua create mode 100644 pre-release/c101302016.lua create mode 100644 pre-release/c101302017.lua create mode 100644 pre-release/c101302020.lua create mode 100644 pre-release/c101302021.lua create mode 100644 pre-release/c101302033.lua create mode 100644 pre-release/c101302034.lua create mode 100644 pre-release/c101302036.lua create mode 100644 pre-release/c101302041.lua create mode 100644 pre-release/c101302050.lua create mode 100644 pre-release/c101302056.lua create mode 100644 pre-release/c101302061.lua create mode 100644 pre-release/c101302062.lua create mode 100644 pre-release/c101302063.lua create mode 100644 pre-release/c101302065.lua create mode 100644 pre-release/c101302066.lua create mode 100644 pre-release/c101302076.lua create mode 100644 pre-release/c101302101.lua create mode 100644 pre-release/c101302102.lua create mode 100644 pre-release/c101302103.lua create mode 100644 pre-release/c101302104.lua create mode 100644 pre-release/c101302105.lua create mode 100644 pre-release/c101302106.lua create mode 100644 pre-release/c101302107.lua create mode 100644 pre-release/c101302108.lua create mode 100644 pre-release/c101302109.lua diff --git a/official/c10808715.lua b/official/c10808715.lua new file mode 100644 index 0000000000..8695f4d3c8 --- /dev/null +++ b/official/c10808715.lua @@ -0,0 +1,69 @@ +--M・HERO ダスク・クロウ +--Masked HERO Dusk Crow +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Masked HERO" monster from your Deck or GY to your hand, except "Masked HERO Dusk Crow" + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) +end +s.listed_series={SET_HERO,SET_MASKED_HERO} +s.listed_names={id} +function s.spcostfilter(c) + return c:IsSetCard(SET_HERO) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return c:IsSetCard(SET_MASKED_HERO) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|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/official/c11161666.lua b/official/c11161666.lua new file mode 100644 index 0000000000..c735e086a0 --- /dev/null +++ b/official/c11161666.lua @@ -0,0 +1,106 @@ +--御巫奉サナキ +--Sanaki the Mikanko Devotee +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Return 1 "Mikanko" card you control to the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Special Summon 1 non-Illusion "Mikanko" 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_EQUIP) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Equip this card to 1 face-up monster on the field as an Equip Spell + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_EQUIP) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.eqtg) + e3:SetOperation(s.eqop) + c:RegisterEffect(e3) +end +s.listed_series={SET_MIKANKO} +function s.thfilter(c) + return c:IsSetCard(SET_MIKANKO) and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return not c:IsRace(RACE_ILLUSION) and c:IsSetCard(SET_MIKANKO) 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 + 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 + --You cannot Special Summon from the Extra Deck for the rest of this turn, except "Mikanko" monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MIKANKO) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,tp,0) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Equip(tp,c,tc) then + --Equip limit + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_EQUIP_LIMIT) + e1:SetValue(function(e,c) return c==tc end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + c:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/official/c22283204.lua b/official/c22283204.lua new file mode 100644 index 0000000000..24e15e5fd4 --- /dev/null +++ b/official/c22283204.lua @@ -0,0 +1,60 @@ +--ティマイオスの眼光 +--The Gaze of Timaeus +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 Fusion Monster from your Extra Deck that mentions a targeted "Dark Magician" or "Dark Magician Girl" as material, by shuffling that target into the Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL,1784686} --"The Eye of Timaeus" +function s.tdfilter(c,e,tp) + return c:IsCode(CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL) and c:IsFaceup() + and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) +end +function s.spfilter(c,e,tp,mc) + if Duel.GetLocationCountFromEx(tp,tp,mc,c)<=0 then return false end + local mustg=aux.GetMustBeMaterialGroup(tp,nil,tp,c,nil,REASON_FUSION) + return c:IsType(TYPE_FUSION) and c:ListsCodeAsMaterial(mc:GetCode()) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) + and (#mustg==0 or (#mustg==1 and mustg:IsContains(mc))) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc==0 then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsCanBeFusionMaterial() and not tc:IsImmuneToEffect(e) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc):GetFirst() + if sc then + sc:SetMaterial(Group.FromCards(tc)) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT|REASON_MATERIAL|REASON_FUSION) + Duel.BreakEffect() + if Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)>0 then + sc:CompleteProcedure() + --Banish it during the End Phase of the next turn + local turn_summoned=Duel.GetTurnCount() + aux.DelayedOperation(sc,PHASE_END,id,e,tp, + function(sc) Duel.Remove(sc,POS_FACEUP,REASON_EFFECT) end, + function() return Duel.GetTurnCount()==turn_summoned+1 end, + nil,2,aux.Stringid(id,1) + ) + end + end + end +end \ No newline at end of file diff --git a/official/c57566760.lua b/official/c57566760.lua new file mode 100644 index 0000000000..c8b64c8173 --- /dev/null +++ b/official/c57566760.lua @@ -0,0 +1,63 @@ +--ウズヒメの御巫 +--Uzuhime the Manifested Mikanko +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 3 "Mikanko" monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MIKANKO),3,2) + --Add 1 Equip Spell from your Deck or GY to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Cannot be destroyed by battle, also your opponent takes any battle damage you would have taken from battles involving this card + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetValue(1) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) + c:RegisterEffect(e3) + --Make another attack in a row + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetCode(EVENT_DAMAGE_STEP_END) + e4:SetCondition(s.atcon) + e4:SetCost(Cost.Detach(1)) + e4:SetOperation(s.atop) + c:RegisterEffect(e4,false,EFFECT_MARKER_DETACH_XMAT) +end +s.listed_series={SET_MIKANKO} +function s.thfilter(c) + return c:IsEquipSpell() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.atcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return Duel.GetAttacker()==c and c:CanChainAttack(0) +end +function s.atop(e,tp,eg,ep,ev,re,r,rp) + if e:GetHandler():IsRelateToBattle() then + Duel.ChainAttack() + end +end \ No newline at end of file diff --git a/official/c58288218.lua b/official/c58288218.lua new file mode 100644 index 0000000000..66342fd025 --- /dev/null +++ b/official/c58288218.lua @@ -0,0 +1,91 @@ +--M・HERO ファーネス +--Masked HERO Furnace +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Mask Change" or "Polymerization" from your Deck to your hand, then discard 1 card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.AND(Cost.SelfReveal,s.thcost)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Special Summon this card if you Special Summon a non-FIRE "HERO" Fusion Monster + 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_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Checks to see if non-"HERO" monsters were Summoned from the Extra Deck + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(SET_HERO) end) +end +s.listed_series={SET_HERO} +s.listed_names={21143940,CARD_POLYMERIZATION} --"Mask Change" +function s.thcost(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 from the Extra Deck the turn you activate this effect, 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_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_HERO) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.thfilter(c) + return c:IsCode(21143940,CARD_POLYMERIZATION) 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 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.spconfilter(c,tp) + return c:IsAttributeExcept(ATTRIBUTE_FIRE) and c:IsSetCard(SET_HERO) and c:IsType(TYPE_FUSION) and c:IsSummonPlayer(tp) and c:IsFaceup() +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e1,true) + end +end \ No newline at end of file diff --git a/official/c59400890.lua b/official/c59400890.lua new file mode 100644 index 0000000000..b011e672b6 --- /dev/null +++ b/official/c59400890.lua @@ -0,0 +1,107 @@ +--滅びの黒魔術師 +--Dark Magician of Destruction +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: "Dark Magician" + 1 LIGHT or DARK monster + Fusion.AddProcMix(c,true,true,CARD_DARK_MAGICIAN,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT|ATTRIBUTE_DARK)) + c:AddMustBeFusionSummoned() + --You can only Fusion Summon or Special Summon by its alternate procedure "Dark Magician of Destruction" once per turn + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetCondition(s.regcon) + e0:SetOperation(s.regop) + c:RegisterEffect(e0) + --You can Special Summon this card by banishing 1 Level 6 or higher DARK Spellcaster monster you control during the turn a Spell Card or effect was activated + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e1:SetCode(EFFECT_SPSUMMON_PROC) + e1:SetRange(LOCATION_EXTRA) + e1:SetCondition(s.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + e1:SetValue(1) + c:RegisterEffect(e1) + --Add 1 "Dark Magician" or 1 card that mentions it from your Deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --This card's name becomes "Dark Magician" while on the field or in the GY + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_CHANGE_CODE) + e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) + e3:SetValue(CARD_DARK_MAGICIAN) + c:RegisterEffect(e3) + --Keep track of a turn a Spell Card or effect was activated + Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsSpellEffect() end) +end +s.listed_names={CARD_DARK_MAGICIAN} +s.material_setcode=SET_DARK_MAGICIAN +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) + --Prevent another Fusion Summon or Special Summon by its alternate procedure of "Dark Magician of Destruction" that turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCode(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.selfspcostfilter(c,tp,sc) + return c:IsLevelAbove(6) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) + and c:IsAbleToRemoveAsCost() and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 +end +function s.selfspcon(e,c) + if not c then return true end + local tp=c:GetControler() + return (Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)>0 or Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0) + and Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_MZONE,0,1,1,true,nil,tp,c) + if g and #g>0 then + g:KeepAlive() + 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 not g then return end + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) + g:DeleteGroup() +end +function s.thfilter(c) + return (c:IsCode(CARD_DARK_MAGICIAN) or c:ListsCode(CARD_DARK_MAGICIAN)) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end diff --git a/official/c71440209.lua b/official/c71440209.lua new file mode 100644 index 0000000000..5ca130e032 --- /dev/null +++ b/official/c71440209.lua @@ -0,0 +1,94 @@ +--黒魔術の護符 +--Dark Magic Amulet +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --You can activate this card the turn it was Set by revealing 1 Spellcaster monster in your hand + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) + e0:SetValue(function(e) e:SetLabel(1) end) + e0:SetCondition(function(e) return Duel.IsExistingMatchingCard(s.discostfilter,e:GetHandlerPlayer(),LOCATION_HAND,0,1,nil) end) + c:RegisterEffect(e0) + --Negate a monster effect that is activated in response to the activation of a card that mentions "Dark Magician" or its effect + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_CHAINING) + e1:SetCondition(s.discon) + e1:SetCost(s.discost) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) + e1:SetLabelObject(e0) + c:RegisterEffect(e1) + --Set this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_LEAVE_GRAVE) + 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:SetCondition(s.setcon) + e2:SetCost(Cost.PayLP(2500)) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_DARK_MAGICIAN} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local chainlink=Duel.GetCurrentChain(true)-1 + if not (chainlink>0 and re:IsMonsterEffect() and Duel.IsChainDisablable(ev)) then return false end + local trig_eff=Duel.GetChainInfo(chainlink,CHAININFO_TRIGGERING_EFFECT) + return trig_eff and trig_eff:GetHandler():ListsCode(CARD_DARK_MAGICIAN) +end +function s.discostfilter(c) + return c:IsRace(RACE_SPELLCASTER) and not c:IsPublic() +end +function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) + local label_obj=e:GetLabelObject() + if chk==0 then label_obj:SetLabel(0) return true end + if label_obj:GetLabel()>0 then + label_obj:SetLabel(0) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectMatchingCard(tp,s.discostfilter,tp,LOCATION_HAND,0,1,1,nil) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + end +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) + if Duel.NegateEffect(ev) then + local code1,code2=re:GetHandler():GetOriginalCodeRule() + --For the rest of this turn, the activated effects of monsters with the same original name are negated + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_SOLVING) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsMonsterEffect() and re:GetHandler():IsOriginalCodeRule(code1,code2) end) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.NegateEffect(ev) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end +function s.setconfilter(c,tp) + return c:IsCode(CARD_DARK_MAGICIAN) and c:IsSummonPlayer(tp) and c:IsFaceup() +end +function s.setcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.setconfilter,1,nil,tp) +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end \ No newline at end of file diff --git a/official/c84550369.lua b/official/c84550369.lua new file mode 100644 index 0000000000..c84cd4a2ea --- /dev/null +++ b/official/c84550369.lua @@ -0,0 +1,85 @@ +--御巫神舞-二貴子 +--Mikanko Divine Dance - Futahashira no Uzu no Miko +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Send 1 "Mikanko" card from your Deck to the GY, except "Mikanko Divine Dance - Futahashira no Uzu no Miko", then you can Set 1 "Mikanko" Spell/Trap from your Deck, except "Mikanko Divine Dance - Futahashira no Uzu no Miko" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOGRAVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) + --Special Summon 1 "Mikanko" Ritual Monster from your hand or Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.AND(Cost.SelfBanish,s.spcost)) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_MIKANKO} +function s.tgfilter(c) + return c:IsSetCard(SET_MIKANKO) and c:IsAbleToGrave() and not c:IsCode(id) +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.setfilter(c) + return c:IsSetCard(SET_MIKANKO) and c:IsSpellTrap() and c:IsSSetable() and not c:IsCode(id) +end +function s.tgop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local dg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #dg>0 and Duel.SendtoGrave(dg,REASON_EFFECT)>0 and dg:GetFirst():IsLocation(LOCATION_GRAVE) then + local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local sg=g:Select(tp,1,1,nil) + if #sg>0 then + Duel.BreakEffect() + Duel.SSet(tp,sg) + end + end + end + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + --You cannot Special Summon from the Extra Deck for the rest of this turn after this card resolves, except "Mikanko" monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MIKANKO) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end + Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_MIKANKO) and c:IsRitualMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,true) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP) + end +end \ No newline at end of file diff --git a/official/c85672957.lua b/official/c85672957.lua new file mode 100644 index 0000000000..7bc5343c6d --- /dev/null +++ b/official/c85672957.lua @@ -0,0 +1,77 @@ +--M・HERO アトミック +--Masked HERO Atomic +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Must be Special Summoned with "Mask Change" + c:AddMustBeSpecialSummoned() + --The first time this card would be destroyed by battle or card effect each turn, it is not destroyed + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetValue(function(e,re,r,rp) return (r&(REASON_BATTLE|REASON_EFFECT))>0 end) + c:RegisterEffect(e1) + --Special Summon 1 non-FIRE "Masked HERO" monster from your GY or banishment in Defense Position + 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+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Set 1 "Change" Quick-Play Spell from your GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_LEAVE_GRAVE) + 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,1}) + e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_names={21143940} --"Mask Change" +s.listed_series={SET_MASKED_HERO,SET_CHANGE} +function s.spfilter(c,e,tp) + return c:IsAttributeExcept(ATTRIBUTE_FIRE) and c:IsSetCard(SET_MASKED_HERO) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,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|LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP_DEFENSE) + end +end +function s.setfilter(c) + return c:IsSetCard(SET_CHANGE) and c:IsQuickPlaySpell() 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_LEAVE_GRAVE,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/official/c85899505.lua b/official/c85899505.lua new file mode 100644 index 0000000000..840c21495d --- /dev/null +++ b/official/c85899505.lua @@ -0,0 +1,86 @@ +--合体魔竜ティマイオス +--Timaeus the United Magidragon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: "Dark Magician" or "Dark Magician Girl" + 1 Dragon or Spellcaster monster + Fusion.AddProcMix(c,true,true,{CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL},aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)) + --After this card is Special Summoned, until the end of your next turn, it is unaffected by other cards' effects + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetOperation(s.regop) + c:RegisterEffect(e0) + --Make this card gain 100 ATK for each Spell in the GYs and banishment + 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:SetCode(EVENT_PRE_DAMAGE_CALCULATE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --Destroy 1 Spell/Trap on the field + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.material_setcode={SET_DARK_MAGICIAN,SET_MAGICIAN_GIRL,SET_DARK_MAGICIAN_GIRL} +s.listed_names={CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL} +function s.regop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local ct=Duel.IsTurnPlayer(tp) and 3 or 2 + --Unaffected by other cards' effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(3100) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_IMMUNE_EFFECT) + e1:SetValue(function(e,re) return e:GetHandler()~=re:GetOwner() end) + e1:SetReset(RESETS_STANDARD_PHASE_END,ct) + c:RegisterEffect(e1) +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSpell),tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,nil) + if chk==0 then return ct>0 end + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,100*ct) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSpell),tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,nil) + if ct==0 then return end + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + --Gains 100 ATK for each Spell in the GYs and banishment + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(100*ct) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) + c:RegisterEffect(e1) + end +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100201001.lua b/pre-release/c100201001.lua new file mode 100644 index 0000000000..8ee5fa9d59 --- /dev/null +++ b/pre-release/c100201001.lua @@ -0,0 +1,42 @@ +--契約を結びし竜の戦士 +--Dragonic Warrior +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Level 4 or lower Dragon monster from your hand or Deck, except "Dragonic Warrior", but its effects are negated + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={id} +function s.spcostfilter(c,e,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) +end +function s.spfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST|REASON_DISCARD,nil,e,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(e:GetHandler()) + end + Duel.SpecialSummonComplete() +end diff --git a/pre-release/c100201002.lua b/pre-release/c100201002.lua new file mode 100644 index 0000000000..9b0c446078 --- /dev/null +++ b/pre-release/c100201002.lua @@ -0,0 +1,31 @@ +--アイン・ロイド +--Einroid +local s,id=GetID() +function s.initial_effect(c) + --Send 2 Level 4 or lower Machine monsters from your Deck 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_DESTROYED) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) +end +function s.tgfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,2,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,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,2,2,nil) + if #g==2 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100201003.lua b/pre-release/c100201003.lua new file mode 100644 index 0000000000..35f72f4627 --- /dev/null +++ b/pre-release/c100201003.lua @@ -0,0 +1,56 @@ +--妖魔ヌリカベ +--Nurikabe +local s,id=GetID() +function s.initial_effect(c) + --Special Summon both 1 other Zombie monster from your GY and this card, but their effects are negated, also banish them when they leave the field + 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_GRAVE) + e1:SetCountLimit(1,id) + e1:SetCondition(aux.exccon) + e1:SetCost(Cost.PayLP(1000)) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +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) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then + for sc in Group.FromCards(c,tc):Iter() do + if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Negate its effects + sc:NegateEffects(c) + --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) + sc:RegisterEffect(e1,true) + end + end + end + Duel.SpecialSummonComplete() +end \ No newline at end of file diff --git a/pre-release/c100443001.lua b/pre-release/c100443001.lua new file mode 100644 index 0000000000..963cbfcef7 --- /dev/null +++ b/pre-release/c100443001.lua @@ -0,0 +1,78 @@ +--恋する乙女 +--Maiden in Love +--scripted by Naim +local s,id=GetID() +local COUNTER_MAIDEN=0x1090 +function s.initial_effect(c) + --Monsters your opponent controls that can attack must attack this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_MUST_ATTACK) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetRange(LOCATION_MZONE) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) + e2:SetValue(function(e,c) return c==e:GetHandler() end) + c:RegisterEffect(e2) + --Cannot be destroyed by battle + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e3:SetRange(LOCATION_MZONE) + e3:SetValue(1) + c:RegisterEffect(e3) + --Activate 1 of these effects at the end of the Damage Step, if this card battled an opponent's monster + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,0)) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetCode(EVENT_DAMAGE_STEP_END) + e4:SetCondition(s.effcon) + e4:SetTarget(s.efftg) + e4:SetOperation(s.effop) + c:RegisterEffect(e4) +end +function s.effcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:GetBattleTarget() and c:IsStatus(STATUS_OPPO_BATTLE) +end +function s.controlfilter(c) + return c:HasCounter(COUNTER_MAIDEN) and c:IsControlerCanBeChanged() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,COUNTER_MAIDEN,1) + local b2=Duel.IsExistingMatchingCard(s.controlfilter,tp,0,LOCATION_MZONE,1,nil) + local c=e:GetHandler() + if chk==0 then return c:IsLocation(LOCATION_MZONE) and c:IsRelateToBattle() and (b1 or b2) end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_COUNTER) + Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,tp,COUNTER_MAIDEN) + elseif op==2 then + e:SetCategory(CATEGORY_CONTROL) + local g=Duel.GetMatchingGroup(s.controlfilter,tp,0,LOCATION_MZONE,nil) + Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Place 1 Maiden Counter on 1 face-up monster your opponent controls. + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) + local sc=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,COUNTER_MAIDEN,1):GetFirst() + if sc then + sc:AddCounter(COUNTER_MAIDEN,1) + end + elseif op==2 then + --Take control of 1 opponent's monster with a Maiden Counter. + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) + local sc=Duel.SelectMatchingCard(tp,s.controlfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() + if sc then + Duel.GetControl(sc,tp) + end + end +end \ No newline at end of file diff --git a/pre-release/c100443003.lua b/pre-release/c100443003.lua new file mode 100644 index 0000000000..b1dacd544f --- /dev/null +++ b/pre-release/c100443003.lua @@ -0,0 +1,80 @@ +--ユーカリ・モール +--Eucalyptus Mole +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 Level 4 or lower Beast monster from your Deck in face-down Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetTarget(s.fdsptg) + e1:SetOperation(s.fdspop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Special Summon 1 "Koala" monster from your Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) + 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.koalasptg) + e3:SetOperation(s.koalaspop) + c:RegisterEffect(e3) +end +s.listed_series={SET_KOALA} +function s.fdspfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) +end +function s.fdsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.fdspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,tp,POS_FACEUP_DEFENSE) +end +function s.fdspop(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.fdspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then + Duel.ConfirmCards(1-tp,g) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsAttackPos() then + Duel.BreakEffect() + Duel.ChangePosition(c,POS_FACEUP_DEFENSE) + end + end +end +function s.koalaspfilter(c,e,tp) + return c:IsSetCard(SET_KOALA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.koalasptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.koalaspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.koalaspop(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.koalaspfilter,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 + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) + --Non-Effect Beast monsters you control gain ATK equal to their own original DEF + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsNonEffectMonster() and c:IsRace(RACE_BEAST) end) + e1:SetValue(function(e,c) return c:GetBaseDefense() end) + e1:SetReset(RESET_PHASE|PHASE_END,2) + Duel.RegisterEffect(e1,tp) + end +end \ No newline at end of file diff --git a/pre-release/c100443005.lua b/pre-release/c100443005.lua new file mode 100644 index 0000000000..8a657b806a --- /dev/null +++ b/pre-release/c100443005.lua @@ -0,0 +1,39 @@ +--幻魔の扉 +--Illusion Gate +local s,id=GetID() +function s.initial_effect(c) + --Destroy as many monsters your opponent controls as possible, then you can Special Summon 1 monster from your opponent's GY to your field, ignoring its Summoning conditions + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCost(Cost.PayLP(1/2)) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if chk==0 then return not Duel.HasFlagEffect(tp,id) and #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_GRAVE) +end +function s.spfilter(c,e,tp) + return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,0,0,1) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sg=Duel.SelectTarget(tp,aux.NecroValleyFilter(s.spfilter),tp,0,LOCATION_GRAVE,1,1,nil,e,tp) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/pre-release/c100443007.lua b/pre-release/c100443007.lua new file mode 100644 index 0000000000..0ffd8ecc80 --- /dev/null +++ b/pre-release/c100443007.lua @@ -0,0 +1,91 @@ +--プリマの光 +--Prima Light +--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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Add 1 Warrior or Fairy "Cyber" 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_GRAVE) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_CYBER} +function s.tribfilter(c,tp) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.nsfilter(c) + return c:IsRace(RACE_WARRIOR) and c:IsSummonable(true,nil) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.CheckReleaseGroup(tp,s.tribfilter,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) + local b2=Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) + elseif op==2 then + e:SetCategory(CATEGORY_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_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 + --Tribute 1 EARTH Warrior monster, and if you do, Special Summon 1 LIGHT Warrior monster from your hand or Deck + local rg=Duel.SelectReleaseGroup(tp,s.tribfilter,1,1,nil,tp) + if #rg>0 and Duel.Release(rg,REASON_EFFECT)>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,false,false,POS_FACEUP) + end + end + elseif op==2 then + --Immediately after this effect resolves, Normal Summon 1 Warrior monster from your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) + local sc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() + if sc then + Duel.Summon(tp,sc,true,nil) + end + end +end +function s.thfilter(c) + return c:IsRace(RACE_WARRIOR|RACE_FAIRY) and c:IsSetCard(SET_CYBER) 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/c100443010.lua b/pre-release/c100443010.lua new file mode 100644 index 0000000000..c5890ee4ea --- /dev/null +++ b/pre-release/c100443010.lua @@ -0,0 +1,67 @@ +--魂の結束-ソウル・ユニオン +--Soul Union +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_series={SET_ELEMENTAL_HERO} +function s.atkfilter(c) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:HasNonZeroAttack() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + e:SetLabelObject(tc) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_FUSION_SUMMON,nil,1,tp,LOCATION_EXTRA) +end +function s.fusconfilter(c) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsType(TYPE_NORMAL) and c:IsFaceup() +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg~=2 then return end + local fc=e:GetLabelObject() + local gc=(tg-fc):GetFirst() + if fc:IsFaceup() and not fc:IsImmuneToEffect(e) then + --That monster on the field gains ATK equal to the ATK of that other monster in the GY until the end of this turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(gc:GetAttack()) + e1:SetReset(RESETS_STANDARD_PHASE_END) + fc:RegisterEffect(e1) + if not Duel.IsExistingMatchingCard(s.fusconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) then return end + local params={fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_ELEMENTAL_HERO),matfilter=function(c) return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemove() end,extrafil=s.fextra,extraop=Fusion.BanishMaterial} + if Fusion.SummonEffTG(params)(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.BreakEffect() + Fusion.SummonEffOP(params)(e,tp,eg,ep,ev,re,r,rp) + end + end +end +function s.fextra(e,tp,mg) + if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) + end + return nil +end \ No newline at end of file diff --git a/pre-release/c100443101.lua b/pre-release/c100443101.lua new file mode 100644 index 0000000000..b4a1065c52 --- /dev/null +++ b/pre-release/c100443101.lua @@ -0,0 +1,101 @@ +--超電導戦士 リニア・マグナム± +--Conduction Warrior Linear Magnum ± +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Must first be Special Summoned (from your hand) by sending 2 "Magnet Warrior" monsters whose original Level is 4 or lower from your hand, Deck, and/or face-up field to the GY + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e0:SetCondition(s.spcon) + e0:SetTarget(s.sptg) + e0:SetOperation(s.spop) + c:RegisterEffect(e0) + --Gains ATK equal to half of the ATK 1 other EARTH monster on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,{id,1}) + e1:SetTarget(s.atktg) + e1:SetOperation(s.atkop) + c:RegisterEffect(e1) + --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_SINGLE+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,2}) + e2:SetCondition(function(e) return e:GetHandler():IsReason(REASON_DESTROY) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MAGNET_WARRIOR} +function s.spconfilter(c) + return c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsMonster() and c:GetOriginalLevel()<=4 + and c:IsAbleToGraveAsCost() and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) +end +function s.spcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil) + return aux.SelectUnselectGroup(g,e,tp,2,2,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_HAND|LOCATION_MZONE|LOCATION_DECK,0,nil) + local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_TOGRAVE) + if #g>0 then + g:KeepAlive() + 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 not g then return end + Duel.SendtoGrave(g,REASON_COST) + g:DeleteGroup() +end +function s.atkfilter(c) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:HasNonZeroAttack() +end +function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst() + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,tc:GetAttack()//2) +end +function s.atkop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + local c=e:GetHandler() + if tc:IsFaceup() and tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then + --Gains ATK equal to half of that monster's ATK + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(tc:GetAttack()//2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + end +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),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/c100443102.lua b/pre-release/c100443102.lua new file mode 100644 index 0000000000..8341e1eb8a --- /dev/null +++ b/pre-release/c100443102.lua @@ -0,0 +1,63 @@ +--錬金釜-カオス・ディスティル +--Chaos Distill +--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) + --Any card sent to your GY is banished instead + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_IGNORE_RANGE) + e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_ALL,0) + e1:SetValue(LOCATION_REMOVED) + e1:SetTarget(function(e,c) return c:IsOwner(e:GetHandlerPlayer()) and Duel.IsPlayerCanRemove(e:GetHandlerPlayer(),c) end) + c:RegisterEffect(e1) + --Activate 1 of these effects + 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_SZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +local CARD_MACRO_COSMOS=30241314 +s.listed_names={CARD_MACRO_COSMOS,id} +function s.macrofilter(c) + return (c:IsCode(CARD_MACRO_COSMOS) or c:ListsCode(CARD_MACRO_COSMOS)) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.monsterfilter(c) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetTextAttack()==-2 and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(s.macrofilter,tp,LOCATION_DECK,0,1,nil) + local c=e:GetHandler() + local b2=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_MACRO_COSMOS),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.monsterfilter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==2 then + Duel.Remove(c,POS_FACEUP,REASON_COST) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local thfilter=(e:GetLabel()==1 and s.macrofilter or s.monsterfilter) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end diff --git a/pre-release/c100443103.lua b/pre-release/c100443103.lua new file mode 100644 index 0000000000..dfaf24888f --- /dev/null +++ b/pre-release/c100443103.lua @@ -0,0 +1,66 @@ +--ヒーローズルール1 ファイブ・フリーダムス +--Hero's Rule 1: Five Freedoms +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Banish up to 5 cards from the GYs + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.rmvtg) + e1:SetOperation(s.rmvop) + c:RegisterEffect(e1) + --Special Summon 1 of your banished "Elemental HERO" monsters + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_GRAVE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,id) + e2:SetCondition(aux.exccon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_ELEMENTAL_HERO} +function s.rmvfilter(c) + return c:IsAbleToRemove() and aux.SpElimFilter(c) +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,s.rmvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0) +end +function s.rmvop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,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_REMOVED) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c100443104.lua b/pre-release/c100443104.lua new file mode 100644 index 0000000000..6e4745de52 --- /dev/null +++ b/pre-release/c100443104.lua @@ -0,0 +1,76 @@ +--デーモンズ・マタドール +--Archfiend Matador +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Add 2 "Archfiend" cards from your Deck to your hand, except "Archfiend Matador" + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Cannot be destroyed by battle, also you take no battle damage from battles involving this card + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e2:SetValue(1) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) + c:RegisterEffect(e3) + --Destroy the monster this card battled, and if you do, inflict 1000 damage to your opponent + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,0)) + e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e4:SetCode(EVENT_BATTLED) + e4:SetTarget(s.destg) + e4:SetOperation(s.desop) + c:RegisterEffect(e4) +end +s.listed_names={100443105,id} --"Ritual of the Matador" +s.listed_series={SET_ARCHFIEND} +function s.thfilter(c) + return c:IsSetCard(SET_ARCHFIEND) 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,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 + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + --This card cannot attack for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(3206) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ATTACK) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local bc=e:GetHandler():GetBattleTarget() + if chk==0 then return bc and bc:IsRelateToBattle() end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetHandler():GetBattleTarget() + if bc and bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)>0 then + Duel.Damage(1-tp,1000,REASON_EFFECT) + end +end diff --git a/pre-release/c100443105.lua b/pre-release/c100443105.lua new file mode 100644 index 0000000000..61c24806c2 --- /dev/null +++ b/pre-release/c100443105.lua @@ -0,0 +1,37 @@ +--マタドール降臨の儀式 ダーク・パセオ +--Ritual of the Matador +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Ritual Summon "Archfiend Matador" + Ritual.AddProcGreaterCode(c,6,nil,100443104) + --Special Summon 1 non-Ritual "Archfiend" monster from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_GRAVE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.SelfBanish) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) +end +s.listed_names={100443104} --"Archfiend Matador" +s.listed_series={SET_ARCHFIEND} +function s.spfilter(c,e,tp) + return not c:IsRitualMonster() and c:IsSetCard(SET_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101301081.lua b/pre-release/c101301081.lua new file mode 100644 index 0000000000..cf76d0be32 --- /dev/null +++ b/pre-release/c101301081.lua @@ -0,0 +1,78 @@ +--Japanese name +--Buio the Dawn's Light +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Monsters in your leftmost or rightmost Main Monster Zones cannot be destroyed by card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSequence(0,4) or (Duel.IsDuelType(DUEL_3_COLUMNS_FIELD) and c:IsSequence(1,3)) end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Negate the effects of 1 Fiend Effect Monster you control, and if you do, Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Mutiny in the Sky" from your Deck to your hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_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={101301083} --"Mutiny in the Sky" +function s.disfilter(c) + return c:IsRace(RACE_FIEND) and c:IsType(TYPE_EFFECT) and c:IsNegatableMonster() +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,LOCATION_MZONE,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_NEGATE) + local g=Duel.SelectTarget(tp,s.disfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then + --Negate its effects + tc:NegateEffects(c) + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end + end +end +function s.thfilter(c) + return c:IsCode(101301083) 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/c101301082.lua b/pre-release/c101301082.lua new file mode 100644 index 0000000000..eaab6fd385 --- /dev/null +++ b/pre-release/c101301082.lua @@ -0,0 +1,86 @@ +--Japanese name +--Luce the Dusk's Dark +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 3 Fiend and/or Fairy monsters in your GY + Fusion.AddProcMixN(c,true,true,s.fusionmatfilter,3) + --Monsters in your leftmost or rightmost Main Monster Zones cannot be destroyed by card effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSequence(0,4) or (Duel.IsDuelType(DUEL_3_COLUMNS_FIELD) and c:IsSequence(1,3)) end) + e1:SetValue(1) + c:RegisterEffect(e1) + --Send 1 Fiend or Fairy monster from your Deck to the GY, and if you do, destroy 1 card your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetTarget(s.tgdestg) + e2:SetOperation(s.tgdesop) + c:RegisterEffect(e2) + --Destroy 1 card on the field + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.descon) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) + c:RegisterEffect(e3) +end +function s.fusionmatfilter(c,fc,sumtype,tp) + return c:IsRace(RACE_FIEND|RACE_FAIRY,fc,sumtype,tp) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) +end +function s.tgfilter(c) + return c:IsRace(RACE_FIEND|RACE_FAIRY) and c:IsAbleToGrave() +end +function s.tgdestg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.tgdesop(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) and g:GetFirst():IsLocation(LOCATION_GRAVE) then + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end + end +end +function s.desconfilter(c,tp) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.desconfilter,1,nil,tp) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() end + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101301083.lua b/pre-release/c101301083.lua new file mode 100644 index 0000000000..b17574ac88 --- /dev/null +++ b/pre-release/c101301083.lua @@ -0,0 +1,48 @@ +--Japanese name +--Mutiny in the Sky +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Fusion Summon 1 Fiend or Fairy Fusion Monster from your Extra Deck, by shuffling Fiend and/or Fairy monsters from your GY into the Deck + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND|RACE_FAIRY),aux.FALSE,s.fextra,Fusion.ShuffleMaterial) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCountLimit(1,id) + c:RegisterEffect(e1) + --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 +function s.matfilter(c) + return c:IsRace(RACE_FIEND|RACE_FAIRY) and c:IsAbleToDeck() +end +function s.fextra(e,tp,mg) + return Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_GRAVE,0,nil) +end +function s.thcostfilter(c) + return c:IsRace(RACE_FIEND|RACE_FAIRY) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) 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_HAND|LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) + Duel.SendtoGrave(g,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/c101301084.lua b/pre-release/c101301084.lua new file mode 100644 index 0000000000..82ec4b92a0 --- /dev/null +++ b/pre-release/c101301084.lua @@ -0,0 +1,64 @@ +-- +--Miracle Raven +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + Pendulum.AddProcedure(c) + c:AddMustBeRitualSummoned() + --Ritual Summon this card, by Tributing monsters from your hand or field whose total Levels equal or exceed 1 + local e1=Ritual.CreateProc({ + handler=c, + lvtype=RITPROC_GREATER, + filter=function(rc) return rc==c end, + lv=1, + location=LOCATION_PZONE, + desc=aux.Stringid(id,0), + self=true + }) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1) + c:RegisterEffect(e1) + --This Ritual Summoned card is unaffected by your opponent's activated 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:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) + e2:SetValue(function(e,te) return te:IsActivated() and te:GetOwnerPlayer()==1-e:GetHandlerPlayer() end) + c:RegisterEffect(e2) + --If you Ritual Summon exactly 1 Ritual Monster with a card effect that requires use of monsters, this card you control can be used as the entire Tribute + local e3=Ritual.AddWholeLevelTribute(c,aux.TRUE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetRange(LOCATION_MZONE) + --Add 1 Ritual Monster from your Deck to your hand + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,1)) + e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_RELEASE) + e4:SetCountLimit(1,id) + e4:SetCondition(function(e) return e:GetHandler():IsReason(REASON_RITUAL) end) + e4:SetTarget(s.thtg) + e4:SetOperation(s.thop) + c:RegisterEffect(e4) +end +s.listed_names={id} +function s.thfilter(c) + return c:IsRitualMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end diff --git a/pre-release/c101301085.lua b/pre-release/c101301085.lua new file mode 100644 index 0000000000..ae89096a2d --- /dev/null +++ b/pre-release/c101301085.lua @@ -0,0 +1,93 @@ +-- +--ASHLAN U1000 +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 monsters with different Types and Attributes + Link.AddProcedure(c,nil,2,nil,s.spcheck) + --If a Ritual Monster this card points to attacks a Defense Position monster, inflict piercing battle damage to your opponent + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_PIERCE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) + e1:SetTarget(function(e,c) return c:IsRitualMonster() and e:GetHandler():GetLinkedGroup():IsContains(c) end) + c:RegisterEffect(e1) + --Add 1 Ritual Monster with a different Type and Attribute than the revealed monster 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_MZONE) + e2:SetCountLimit(1,id) + e2:SetCost(s.thcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Return 1 face-up card your opponent controls to the hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.rthcon) + e3:SetTarget(s.rthtg) + e3:SetOperation(s.rthop) + c:RegisterEffect(e3) +end +function s.spcheck(g,lc,sumtype,tp) + return g:CheckDifferentPropertyBinary(Card.GetRace,lc,sumtype,tp) and g:CheckDifferentPropertyBinary(Card.GetAttribute,lc,sumtype,tp) +end +function s.thcostfilter(c,tp) + return c:IsRitualMonster() and not c:IsPublic() + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetRace(),c:GetAttribute()) +end +function s.thfilter(c,race,attribute) + return c:IsRitualMonster() and c:IsDifferentRace(race) and c:IsAttributeExcept(attribute) and c:IsAbleToHand() +end +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND,0,1,nil,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst() + Duel.ConfirmCards(1-tp,rc) + Duel.ShuffleHand(tp) + e:SetLabelObject(rc) + rc:CreateEffectRelation(e) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local rc=e:GetLabelObject() + if not rc:IsRelateToEffect(e) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,rc:GetRace(),rc:GetAttribute()) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.rthconfilter(c,tp) + return c:IsRitualSummoned() and c:IsSummonPlayer(tp) +end +function s.rthcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.rthconfilter,1,nil,tp) +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.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToHand),tp,0,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 \ No newline at end of file diff --git a/pre-release/c101301086.lua b/pre-release/c101301086.lua new file mode 100644 index 0000000000..097e6665c9 --- /dev/null +++ b/pre-release/c101301086.lua @@ -0,0 +1,85 @@ +-- +--Readying of Rites +--scripted by pyrQ +local s,id=GetID() +local TOKEN_SACIFICIAL_OFFERING=id+100 +function s.initial_effect(c) + --Add 1 Fiend Ritual Monster from your Deck to your hand, then if you added a Pendulum Monster, you can Special Summon 1 "Sacrificial Offering Token" (Fiend/DARK/Level 1/ATK 300/DEF 300) + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Draw 1 card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EVENT_BATTLE_DAMAGE) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.drcon) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) + c:RegisterEffect(e2) +end +s.listed_names={TOKEN_SACIFICIAL_OFFERING} +function s.thfilter(c) + return c:IsRace(RACE_FIEND) and c:IsRitualMonster() and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,sc) + Duel.ShuffleHand(tp) + if sc:IsType(TYPE_PENDULUM) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SACIFICIAL_OFFERING,0,TYPES_TOKEN,300,300,1,RACE_FIEND,ATTRIBUTE_DARK) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + local token=Duel.CreateToken(tp,TOKEN_SACIFICIAL_OFFERING) + Duel.BreakEffect() + if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)>0 then + token:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + --While you control that Token, you cannot Special Summon from the Extra Deck + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + 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:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + token:RegisterEffect(e1,true) + end + end + end +end +function s.drconfilter(c,tp) + return c:IsRitualMonster() and c:IsControler(tp) +end +function s.drcon(e,tp,eg,ep,ev,re,r,rp) + return ep==1-tp and eg:IsExists(s.drconfilter,1,nil,tp) +end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Draw(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/pre-release/c101301087.lua b/pre-release/c101301087.lua new file mode 100644 index 0000000000..30ed6052bb --- /dev/null +++ b/pre-release/c101301087.lua @@ -0,0 +1,98 @@ +-- +--Steel-Stringed Sacrifice +--Scripted by Hatter +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_IGNITION) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e1:SetCost(s.effcost) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) +end +function s.effcostfilter(c) + return c:IsLevelAbove(5) and not c:IsPublic() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.effcostfilter,tp,LOCATION_HAND,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.effcostfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() + Duel.ConfirmCards(1-tp,rc) + Duel.ShuffleHand(tp) + e:SetLabelObject(rc) + e:SetLabel(rc:GetOriginalCodeRule()) + rc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) +end +function s.thfilter(c) + return c:IsLevelAbove(5) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + local b1=c:IsLocation(LOCATION_HAND) and not Duel.HasFlagEffect(tp,id) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + local b2=c:IsLocation(LOCATION_GRAVE) and not Duel.HasFlagEffect(tp,id+100) and c:IsAbleToHand() + local b3=c:IsLocation(LOCATION_GRAVE) and not Duel.HasFlagEffect(tp,id+200) + and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,c) + if chk==0 then return b1 or b2 or b3 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}, + {b3,aux.Stringid(id,4)}) + Duel.SetTargetParam(op) + Duel.RegisterFlagEffect(tp,id+(op-1)*100,RESET_PHASE|PHASE_END,0,1) + if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) + elseif op==2 then + e:SetCategory(CATEGORY_TOHAND) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) + elseif op==3 then + e:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local code=e:GetLabel() + local rc=e:GetLabelObject() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,5)) + --Register if the player Normal Summons the revealed monster or a monster with the same original name + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1) + e1:SetCondition(function(e,tp,eg,ep) return ep==tp and ((rc:HasFlagEffect(id) and eg:IsContains(rc) and rc:IsFaceup()) or eg:IsExists(aux.FaceupFilter(Card.IsOriginalCodeRule,code),1,nil)) end) + e1:SetOperation(function(e) e:SetLabel(1) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --During the End Phase of this turn, lose 1000 LP if you did not Normal Summon the revealed monster, or a monster with the same original name + local e2=e1:Clone() + e2:SetDescription(aux.Stringid(id,6)) + e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetCondition(function() return e1:GetLabel()==0 end) + e2:SetOperation(function(e,tp) Duel.SetLP(tp,Duel.GetLP(tp)-1000) end) + Duel.RegisterEffect(e2,tp) + if not c:IsRelateToEffect(e) then return end + local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + if op==1 then + --Special Summon this card from your hand + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + elseif op==2 then + --Add this card from your GY to your hand + Duel.SendtoHand(c,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,c) + elseif op==3 then + --Banish this card from your GY, and if you do, add 1 Level 5 or higher monster from your GY to your hand + if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)==0 or not c:IsLocation(LOCATION_REMOVED) then return end + 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 +end \ No newline at end of file diff --git a/pre-release/c101301088.lua b/pre-release/c101301088.lua new file mode 100644 index 0000000000..f66e6fb0ce --- /dev/null +++ b/pre-release/c101301088.lua @@ -0,0 +1,81 @@ +--Japanese name +--Xyz Lay +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + local e0=aux.AddEquipProcedure(c) + e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + --The equipped monster gains 200 ATK for each Xyz Material attached to a monster on the field + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_EQUIP) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(function(e) return 200*Duel.GetOverlayCount(0,1,1) end) + c:RegisterEffect(e1) + --Activate the following effect, based on the equipped monster's card type + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) + e2:SetCost(s.effcost) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_XYZ} +function s.thcfilter(c) + return c:IsAttribute(ATTRIBUTE_WIND) and c:IsMonster() and c:IsDiscardable() +end +function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) + local ec=e:GetHandler():GetEquipTarget() + if chk==0 then return not ec:IsType(TYPE_XYZ) or Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_COST) end + if ec:IsType(TYPE_XYZ) then + Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_COST) + end +end +function s.setfilter(c) + return c:IsSetCard(SET_XYZ) and c:IsSpellTrap() and c:IsSSetable() +end +function s.spfilter(c,e,tp,lv) + return c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local ec=e:GetHandler():GetEquipTarget() + local b1=ec:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) + local b2=not ec:IsType(TYPE_XYZ) and ec:HasLevel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,ec:GetLevel()) + if chk==0 then return b1 or b2 end + if b1 then + e:SetLabel(1) + e:SetCategory(0) + Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,1)) + elseif b2 then + e:SetLabel(2) + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,2)) + Duel.SetOperationInfo(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 + --Set 1 "Xyz" Spell/Trap from your Deck + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SSet(tp,g) + end + elseif op==2 then + --Special Summon 1 monster with the same Level as the equipped monster from your hand in Defense Position + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,c:GetEquipTarget():GetLevel()):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then + --Negate its effects + sc:NegateEffects(c) + end + Duel.SpecialSummonComplete() + end +end \ No newline at end of file diff --git a/pre-release/c101301089.lua b/pre-release/c101301089.lua new file mode 100644 index 0000000000..2175ab4fba --- /dev/null +++ b/pre-release/c101301089.lua @@ -0,0 +1,72 @@ +-- +--Psychic Omnibuster +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner Psychic monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsRace,RACE_PSYCHIC),1,99) + --Look at 1 random card in your opponent's hand, and if it is the declared card type, apply these effects in sequence + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_REMOVE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e,tp,eg,ep,ev) return ep==1-tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&(LOCATION_MZONE|LOCATION_SZONE)>0 end) + e1:SetCost(Cost.PayLP(2000)) + e1:SetTarget(s.looktg) + e1:SetOperation(s.lookop) + c:RegisterEffect(e1) + aux.GlobalCheck(s,function() + s.declared_types={} + s.declared_types[0]=0 + s.declared_types[1]=0 + aux.AddValuesReset(function() + s.declared_types[0]=0 + s.declared_types[1]=0 + end) + end) +end +function s.looktg(e,tp,eg,ep,ev,re,r,rp,chk) + local declared_types=s.declared_types[tp] + if chk==0 then return declared_types~=(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) + local op=Duel.SelectEffect(tp, + {declared_types&TYPE_MONSTER==0,DECLTYPE_MONSTER}, + {declared_types&TYPE_SPELL==0,DECLTYPE_SPELL}, + {declared_types&TYPE_TRAP==0,DECLTYPE_TRAP}) + local typ=1<<(op-1) + s.declared_types[tp]=declared_types|typ + Duel.SetTargetParam(typ) +end +function s.lookop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then return end + local rc=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1):GetFirst() + Duel.ConfirmCards(tp,rc) + Duel.ShuffleHand(1-tp) + local typ=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + if not rc:IsType(typ) then return end + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + local desc=(typ==TYPE_MONSTER and 3010) + or (typ==TYPE_SPELL and 3011) + or (typ==TYPE_TRAP and 3012) + Duel.BreakEffect() + --This card cannot be destroyed by the effects of the declared card type this turn + local e1=Effect.CreateEffect(c) + e1:SetDescription(desc) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetValue(function(e,te) return te:IsActiveType(typ) end) + e1:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e1) + end + if rc:IsAbleToRemove() then + Duel.BreakEffect() + --Banish the card you looked at, face-up, until the End Phase + aux.RemoveUntil(rc,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY,PHASE_END,id,e,tp,function(ag) Duel.SendtoHand(ag,nil,REASON_EFFECT) end) + end +end \ No newline at end of file diff --git a/pre-release/c101301090.lua b/pre-release/c101301090.lua new file mode 100644 index 0000000000..0fe6854615 --- /dev/null +++ b/pre-release/c101301090.lua @@ -0,0 +1,59 @@ +-- +--R.B. Ga10 Driller +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) + 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,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Destroy both 1 monster your opponent controls and this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCondition(s.descon) + e2:SetCost(Cost.PayLP(500)) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) +end +function s.desconfilter(c,ec,lg) + return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) 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,tp)+e:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,0) +end +function s.desop(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:IsMonster() then + Duel.Destroy(Group.FromCards(tc,c),REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101301091.lua b/pre-release/c101301091.lua new file mode 100644 index 0000000000..c20fdbf914 --- /dev/null +++ b/pre-release/c101301091.lua @@ -0,0 +1,62 @@ +-- +--R.B. Ga10 Cutter +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) + 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,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Destroy this card, and if you do, negate a Spell/Trap Card or effect activated by your opponent, and if you do that, destroy that card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.descon) + e2:SetCost(Cost.PayLP(700)) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) +end +function s.desconfilter(c,ec,lg) + return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return rp==1-tp and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) + and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return true end + local c=e:GetHandler() + local rc=re:GetHandler() + if rc:IsRelateToEffect(re) and rc:IsDestructable() then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg+c,2,tp,0) + else + Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0) + end + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 + and Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101301092.lua b/pre-release/c101301092.lua new file mode 100644 index 0000000000..750a65ebd1 --- /dev/null +++ b/pre-release/c101301092.lua @@ -0,0 +1,61 @@ +-- +--R.B. VALCan Rocket +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --If you control no face-up monsters, on the only face-up monsters you control are "R.B." monsters, you can Special Summon this card (from your hand) + 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,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.spcon) + c:RegisterEffect(e1) + --Destroy up to 2 cards your opponent controls, also this card, and if you do, inflict 500 damage to your opponent for each card destroyed + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.descon) + e2:SetCost(Cost.PayLP(1000)) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.spcon(e,c) + if c==nil then return true end + local tp=e:GetHandlerPlayer() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_RB)),tp,LOCATION_MZONE,0,1,nil) +end +function s.desconfilter(c,ec,lg) + return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec)) +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup()) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,2,nil,tp)+e:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tg=Duel.GetTargetCards(e) + if c:IsRelateToEffect(e) then tg:AddCard(c) end + if #tg==0 then return end + local dam=Duel.Destroy(tg,REASON_EFFECT)*500 + if dam>0 then + Duel.Damage(1-tp,dam,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101301093.lua b/pre-release/c101301093.lua new file mode 100644 index 0000000000..5af62abb67 --- /dev/null +++ b/pre-release/c101301093.lua @@ -0,0 +1,86 @@ +-- +--R.B. VALCan Booster +--Scripted by Hatter +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,2) + --Add 1 "R.B." 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_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Special Summon 1 "R.B." monster from your hand or GY in Defense Position, then you can move this card you control to another of your Main Monster Zones + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_EMZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.thfilter(c) + return c:IsSetCard(SET_RB) and c:IsSpell() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +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_RB) 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 chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 + and c:IsRelateToEffect(e) and c:IsControler(tp) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) + local seq=math.log(Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0),2) + Duel.BreakEffect() + Duel.MoveSequence(c,seq) + end + end + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Machine monsters with 1500 or less ATK + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsRace(RACE_MACHINE) and c:IsAttackBelow(1500)) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) + local atk=c:GetTextAttack() + return not c:IsOriginalRace(RACE_MACHINE) or atk==-2 or atk>1500 + end) +end \ No newline at end of file diff --git a/pre-release/c101301094.lua b/pre-release/c101301094.lua new file mode 100644 index 0000000000..9b08ee05bf --- /dev/null +++ b/pre-release/c101301094.lua @@ -0,0 +1,69 @@ +--JP Name +--R.B. The Brute Blues +--Scripted by The Razgriz +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) + --Gains total original ATK of "R.B." monsters this card points to while it points to a "R.B." monster + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) + e1:SetValue(s.atkval) + c:RegisterEffect(e1) + --Can make a second attack during each Battle Phase while it points to a "R.B." monster + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_EXTRA_ATTACK) + e2:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) + e2:SetValue(1) + c:RegisterEffect(e2) + --Cannot be destroyed by battle or card effects while it points to a "R.B." monster + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(function(e) return e:GetHandler():GetLinkedGroup():IsExists(Card.IsSetCard,1,nil,SET_RB) end) + e3:SetValue(1) + c:RegisterEffect(e3) + local e4=e3:Clone() + e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e4) + --Add 1 "R.B." card from your Deck to your hand + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,0)) + e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e5:SetType(EFFECT_TYPE_IGNITION) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1,id) + e5:SetTarget(s.thtg) + e5:SetOperation(s.thop) + c:RegisterEffect(e5) +end +s.listed_series={SET_RB} +function s.atkfilter(c) + return c:IsFaceup() and c:IsSetCard(SET_RB) and c:GetBaseAttack()>=0 +end +function s.atkval(e,c) + return c:GetLinkedGroup():Filter(s.atkfilter,nil):GetSum(Card.GetBaseAttack) +end +function s.thfilter(c) + return c:IsSetCard(SET_RB) 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/c101301095.lua b/pre-release/c101301095.lua new file mode 100644 index 0000000000..69dde151b5 --- /dev/null +++ b/pre-release/c101301095.lua @@ -0,0 +1,83 @@ +--JP Name +--R.B. Funk Dock +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "R.B." card from your Deck to your hand, except "R.B. Funk Dock" + 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) + --Gain 500 LP each time a monster(s) your opponent controls is destroyed + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_FZONE) + e2:SetCondition(s.lpcon) + e2:SetOperation(function(e) Duel.Hint(HINT_CARD,0,id) Duel.Recover(e:GetHandlerPlayer(),500,REASON_EFFECT) end) + c:RegisterEffect(e2) + --Special Summon 1 "R.B." monster from your Deck + 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) + e3:SetCode(EVENT_LEAVE_FIELD) + e3:SetRange(LOCATION_FZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.spcon) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_series={SET_RB} +s.listed_names={id} +function s.thfilter(c) + return c:IsSetCard(SET_RB) and c:IsAbleToHand() and not c:IsCode(id) +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.lpconfilter(c,tp) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end +function s.lpcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.lpconfilter,1,nil,1-tp) +end +function s.spconfilter(c,tp) + return c:IsPreviousSetCard(SET_RB) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) + and c:IsReason(REASON_EFFECT) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_RB) 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 diff --git a/pre-release/c101301096.lua b/pre-release/c101301096.lua new file mode 100644 index 0000000000..c8137974be --- /dev/null +++ b/pre-release/c101301096.lua @@ -0,0 +1,69 @@ +--JP Name +--R.B. Stage Landing +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Special Summon 1 "R.B." monster from your Deck/Extra Deck with a different name from the cards you control + 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:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or (c:IsRace(RACE_MACHINE) and c:GetBaseAttack()<=1500) end) + --If an "R.B." monster(s) you control would be destroyed, you can banish this card from your GY instead + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EFFECT_DESTROY_REPLACE) + e2:SetRange(LOCATION_GRAVE) + e2:SetTarget(s.reptg) + e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) + e2:SetOperation(function(e) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end) + c:RegisterEffect(e2) +end +s.listed_series={SET_RB} +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end + --You cannot Special Summon from the Extra Deck the turn you activate this card, except Machine monsters with 1500 or less original ATK + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsRace(RACE_MACHINE) and c:GetBaseAttack()<=1500) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.spfilter(c,e,tp) + if not (c:IsSetCard(SET_RB) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD,0,1,nil)) then return false end + if c:IsLocation(LOCATION_DECK) then + return Duel.GetMZoneCount(tp)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.repfilter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_RB) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end +function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end + return Duel.SelectEffectYesNo(tp,c,96) +end \ No newline at end of file diff --git a/pre-release/c101302006.lua b/pre-release/c101302006.lua new file mode 100644 index 0000000000..9dc7f1a534 --- /dev/null +++ b/pre-release/c101302006.lua @@ -0,0 +1,91 @@ +--剛鬼マシン・スープレックス +--Gouki Mashin Suprex +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon both this card and 1 "Gouki" monster in 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) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Add 1 "Gouki" card from your Deck to your hand, except "Gouki Mashin Suprex" + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI} +s.listed_names={id} +function s.spcostfilter(c,e,tp) + return c:IsSetCard(SET_GOUKI) and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsPublic() + and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c,e,tp):GetFirst() + e:SetLabelObject(rc) + rc:CreateEffectRelation(e) + Duel.ConfirmCards(1-tp,Group.FromCards(c,rc)) + Duel.ShuffleHand(tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,e:GetLabelObject()),2,tp,0) +end +function s.spfilter(c,e,tp) + return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + local c=e:GetHandler() + local sg=Group.FromCards(c,e:GetLabelObject()) + if sg:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then + for sc in sg:Iter() do + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --You cannot Special Summon, except "Gouki" 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+EFFECT_FLAG_UNCOPYABLE) + 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 not c:IsSetCard(SET_GOUKI) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1,true) + end + end +end +function s.thfilter(c) + return c:IsSetCard(SET_GOUKI) 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/c101302012.lua b/pre-release/c101302012.lua new file mode 100644 index 0000000000..29b8b7dde0 --- /dev/null +++ b/pre-release/c101302012.lua @@ -0,0 +1,70 @@ +--絢嵐たるメガラ +--Magnifistorming Megala +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, you can Special Summon this card (from your hand) + 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,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.selfspcon) + c:RegisterEffect(e1) + --Special Summon 1 "Magnifistorm" monster from your Deck with a different name from the monsters you control + 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) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + 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_MAGNIFISTORM} +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) + or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and (rc:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) or (rc:IsSetCard(SET_MAGNIFISTORM) and rc:IsQuickPlaySpell())) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_MAGNIFISTORM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_MZONE,0,1,nil) +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 + 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 + --You cannot Special Summon for the rest of this turn, except WIND 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_WIND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c101302013.lua b/pre-release/c101302013.lua new file mode 100644 index 0000000000..8abade161a --- /dev/null +++ b/pre-release/c101302013.lua @@ -0,0 +1,54 @@ +--絢嵐たるエルダム +--Magnifistorming Erdam +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, you can Special Summon this card (from your hand) + 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,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.selfspcon) + c:RegisterEffect(e1) + --Add 1 "Magnifistorm" monster or 1 "Mystical Space Typhoon" from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) +end +s.listed_series={SET_MAGNIFISTORM} +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON,id} +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) + or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) +end +function s.thfilter(c) + return ((c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster()) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) and c:IsAbleToHand() and not c:IsCode(id) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +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/c101302014.lua b/pre-release/c101302014.lua new file mode 100644 index 0000000000..b5f232509a --- /dev/null +++ b/pre-release/c101302014.lua @@ -0,0 +1,54 @@ +--絢嵐たるスエン +--Magnifistorming Suen +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --If you have "Mystical Space Typhoon" in your GY, or your opponent controls no Spells/Traps, you can Special Summon this card (from your hand) + 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,EFFECT_COUNT_CODE_OATH) + e1:SetCondition(s.selfspcon) + c:RegisterEffect(e1) + --Add 1 "Magnifistorm" Spell/Trap or 1 "Mystical Space Typhoon" from your Deck to your hand + local e2a=Effect.CreateEffect(c) + e2a:SetDescription(aux.Stringid(id,1)) + e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2a:SetProperty(EFFECT_FLAG_DELAY) + e2a:SetCode(EVENT_SUMMON_SUCCESS) + e2a:SetCountLimit(1,{id,1}) + e2a:SetTarget(s.thtg) + e2a:SetOperation(s.thop) + c:RegisterEffect(e2a) + local e2b=e2a:Clone() + e2b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2b) +end +s.listed_series={SET_MAGNIFISTORM} +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +function s.selfspcon(e,c) + if c==nil then return true end + local tp=c:GetControler() + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) + or not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil)) +end +function s.thfilter(c) + return ((c:IsSetCard(SET_MAGNIFISTORM) and c:IsSpellTrap()) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) 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/c101302015.lua b/pre-release/c101302015.lua new file mode 100644 index 0000000000..afc372648c --- /dev/null +++ b/pre-release/c101302015.lua @@ -0,0 +1,89 @@ +--絢嵐たるスエン +--Magnifistorming Crothea +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Cannot be destroyed by battle or card effects while your opponent controls no Spells/Traps + local e1a=Effect.CreateEffect(c) + e1a:SetType(EFFECT_TYPE_SINGLE) + e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1a:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1a:SetRange(LOCATION_MZONE) + e1a:SetCondition(function(e) return not Duel.IsExistingMatchingCard(Card.IsSpellTrap,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,1,nil) end) + e1a:SetValue(1) + c:RegisterEffect(e1a) + local e1b=e1a:Clone() + e1b:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e1b) + --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_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,id) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Add 1 "Magnifistorm" card and/or 1 "Mystical Space Typhoon" from your Deck and/or GY to your hand + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,1)) + e3a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + 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_series={SET_MAGNIFISTORM} +s.listed_names={id,CARD_MYSTICAL_SPACE_TYPHOON} +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thfilter(c) + return (c:IsSetCard(SET_MAGNIFISTORM) or c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON)) and c:IsAbleToHand() and not c:IsCode(id) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.rescon(sg,e,tp,mg) + return sg:FilterCount(Card.IsSetCard,nil,SET_MAGNIFISTORM)<=1 and sg:FilterCount(Card.IsCode,nil,CARD_MYSTICAL_SPACE_TYPHOON)<=1 +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil) + if #g>0 then + local sg=aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon,1,tp,HINTMSG_ATOHAND) + if #sg>0 then + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end + end + --You cannot Special Summon for the rest of this turn, except WIND 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_WIND) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c101302016.lua b/pre-release/c101302016.lua new file mode 100644 index 0000000000..edee6484a5 --- /dev/null +++ b/pre-release/c101302016.lua @@ -0,0 +1,69 @@ +--絢嵐渦麗ヴァルルーン +--Magnifistorm Vortex Beauty Valrune +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate a monster effect activated by the opponent, then if you have 2 or more "Mystical Space Typhoon" in your GY, you can destroy that monster. + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.discon) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --Special Summon this card from your GY if "Mystical Space Typhoon" is activated + local e3=e1:Clone() + e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + c:RegisterEffect(e3) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +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.discon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) + and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,CARD_MYSTICAL_SPACE_TYPHOON) +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) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,re:GetHandler(),1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) and rc:IsDestructable() + and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,2,nil,CARD_MYSTICAL_SPACE_TYPHOON) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + Duel.BreakEffect() + Duel.Destroy(eg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101302017.lua b/pre-release/c101302017.lua new file mode 100644 index 0000000000..b14388bfcc --- /dev/null +++ b/pre-release/c101302017.lua @@ -0,0 +1,65 @@ +--絢嵐豪火フォニクス +--Magnifistorm Great Pyre Phonix +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand if a Quick-Play Spell Card is activated + 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_DELAY) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Shuffle up to 2 cards your opponent controls into 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_CARD_TARGET+EFFECT_FLAG_DELAY) + 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 re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsActiveType(TYPE_QUICKPLAY) end) + e2:SetTarget(s.tdtg) + e2:SetOperation(s.tdop) + c:RegisterEffect(e2) + --Special Summon this card from your GY if "Mystical Space Typhoon" is activated + local e3=e1:Clone() + e3:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS) + e3:SetRange(LOCATION_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + c:RegisterEffect(e3) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +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.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) 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,2,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,tp,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101302020.lua b/pre-release/c101302020.lua new file mode 100644 index 0000000000..1ee6aab373 --- /dev/null +++ b/pre-release/c101302020.lua @@ -0,0 +1,95 @@ +--ドレミコード・ソルフェージア +--Solfachord Solfeggia +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --Negate a monster effect activated by your opponent, then destroy this card + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAIN_SOLVING) + e1:SetRange(LOCATION_PZONE) + e1:SetCondition(s.discon) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --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) + e2:SetCondition(function(e,tp) return not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsSetCard,SET_SOLFACHORD)),tp,LOCATION_MZONE,0,1,nil) end) + e2:SetTarget(s.selfsptg) + e2:SetOperation(s.selfspop) + c:RegisterEffect(e2) + --Special Summon 1 "Solfachord" monster from your hand, except "Solfachord Solfeggia" + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetTarget(s.sptg) + e3:SetOperation(s.spop) + c:RegisterEffect(e3) +end +s.listed_names={id} +s.listed_series={SET_GRANSOLFACHORD,SET_SOLFACHORD} +function s.discon(e,tp,eg,ep,ev,re,r,rp) + return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) and not Duel.HasFlagEffect(tp,id) + and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GRANSOLFACHORD),tp,LOCATION_MZONE,0,1,nil) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,2)) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.Hint(HINT_CARD,0,id) + if Duel.NegateEffect(ev) then + Duel.BreakEffect() + Duel.Destroy(c,REASON_EFFECT) + end +end +function s.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.spfilter(c,e,tp,exc) + if not (c:IsSetCard(SET_SOLFACHORD) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if c:IsLocation(LOCATION_HAND|LOCATION_GRAVE) then + return Duel.GetMZoneCount(tp,exc)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,exc,c)>0 + end +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local cost_chk=Cost.SelfTribute(e,tp,eg,ep,ev,re,r,rp,0) + local exc=cost_chk and e:GetHandler() or nil + local location=cost_chk and LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA or LOCATION_HAND + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,location,0,1,nil,e,tp,exc) end + local hand_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + if cost_chk and (not hand_chk or Duel.SelectYesNo(tp,aux.Stringid(id,3))) then + Cost.SelfTribute(e,tp,eg,ep,ev,re,r,rp,1) + e:SetLabel(LOCATION_HAND|LOCATION_GRAVE|LOCATION_EXTRA) + else + e:SetLabel(LOCATION_HAND) + end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,e:GetLabel()) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,e:GetLabel(),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/c101302021.lua b/pre-release/c101302021.lua new file mode 100644 index 0000000000..a9783f4bed --- /dev/null +++ b/pre-release/c101302021.lua @@ -0,0 +1,120 @@ +--ドレミコード・プリモア +--Solfachord Primoria +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + --Return 1 "Solfachord" card in your Pendulum Zone to the hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetRange(LOCATION_PZONE) + e1:SetCondition(function(e,tp,eg) return eg:IsExists(s.pendthconfilter,1,nil,tp) end) + e1:SetTarget(s.pendthtg) + e1:SetOperation(s.pendthop) + c:RegisterEffect(e1) + --While you have "Solfachord" cards with even and odd Pendulum Scales in your Pendulum Zone, your activated "Solfachord" cards' effects cannot be negated + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_CANNOT_DISEFFECT) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(s.immcon) + e2:SetValue(s.immval) + c:RegisterEffect(e2) + --Add 1 "Solfachord" card from your Deck to your hand, except "Solfachord Primoria" + local e3a=Effect.CreateEffect(c) + e3a:SetDescription(aux.Stringid(id,1)) + e3a:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3a:SetProperty(EFFECT_FLAG_DELAY) + e3a:SetCode(EVENT_SUMMON_SUCCESS) + e3a:SetCountLimit(1,id) + e3a:SetTarget(s.deckthtg) + e3a:SetOperation(s.deckthop) + c:RegisterEffect(e3a) + local e3b=e3a:Clone() + e3b:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3b) + --Add 1 "Solfachord" card from your GY or face-up Extra Deck to your hand + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_TOHAND) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_SPSUMMON_SUCCESS) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,{id,1}) + e4:SetCondition(function(e,tp,eg) return eg:IsExists(s.gyedthconfilter,1,nil,tp) end) + e4:SetTarget(s.gyedthtg) + e4:SetOperation(s.gyedthop) + c:RegisterEffect(e4) +end +s.listed_names={id} +s.listed_series={SET_SOLFACHORD} +function s.pendthconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() +end +function s.pendthfilter(c) + return c:IsSetCard(SET_SOLFACHORD) and c:IsAbleToHand() +end +function s.pendthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_PZONE) and s.pendthfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.pendthfilter,tp,LOCATION_PZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,s.pendthfilter,tp,LOCATION_PZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) +end +function s.pendthop(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.immcon(e) + local g=Duel.GetMatchingGroup(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,nil,SET_SOLFACHORD) + local a,b=g:GetFirst(),g:GetNext() + return a and b and ((a:GetScale()+b:GetScale())%2==1) +end +function s.immval(e,ct) + local trig_player,trig_setcodes=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_SETCODES) + if trig_player==1-e:GetHandlerPlayer() then return false end + for _,setcode in ipairs(trig_setcodes) do + if (SET_SOLFACHORD&0xfff)==(setcode&0xfff) and (SET_SOLFACHORD&setcode)==SET_SOLFACHORD then return true end + end +end +function s.deckthfilter(c) + return c:IsSetCard(SET_SOLFACHORD) and not c:IsCode(id) and c:IsAbleToHand() +end +function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.deckthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.deckthfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.gyedthconfilter(c,tp) + return c:IsLinkSummoned() and c:IsSetCard(SET_SOLFACHORD) and c:IsSummonPlayer(tp) +end +function s.gyedthfilter(c) + return c:IsSetCard(SET_SOLFACHORD) and c:IsFaceup() and c:IsAbleToHand() +end +function s.gyedthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.gyedthfilter,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_EXTRA) +end +function s.gyedthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.gyedthfilter),tp,LOCATION_GRAVE|LOCATION_EXTRA,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/c101302033.lua b/pre-release/c101302033.lua new file mode 100644 index 0000000000..36a5722bba --- /dev/null +++ b/pre-release/c101302033.lua @@ -0,0 +1,65 @@ +--メガリス・フローチュ +--Megalith Phuloch +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Add 1 "Megalith" card from your GY to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) + e1:SetCost(Cost.HardOncePerChain(id)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + local ritual_params={ + handler=c, + filter=function(c) return c:IsSetCard(SET_MEGALITH) and not c:IsCode(id) end, + lvtype=RITPROC_GREATER, + location=LOCATION_GRAVE, + forcedselection=function(e,tp,g,sc) return g:IsContains(e:GetHandler()) end + } + --Ritual Summon 1 "Megalith" Ritual Monster from your GY, by Tributing monsters from your hand or field, including this card on your field, whose total Levels equal or exceed the Level of the Ritual Monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + 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:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetCost(Cost.HardOncePerChain(id)) + e2:SetTarget(Ritual.Target(ritual_params)) + e2:SetOperation(s.ritop(Ritual.Operation(ritual_params))) + c:RegisterEffect(e2) +end +s.listed_series={SET_MEGALITH} +s.listed_names={id} +function s.thfilter(c) + return c:IsSetCard(SET_MEGALITH) 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.ritop(default_operation) + return function(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsControler(tp) then + default_operation(e,tp,eg,ep,ev,re,r,rp) + end + end +end diff --git a/pre-release/c101302034.lua b/pre-release/c101302034.lua new file mode 100644 index 0000000000..40fb0171af --- /dev/null +++ b/pre-release/c101302034.lua @@ -0,0 +1,85 @@ +--メガリス・ノートラ・プルーラ +--Megalith Nortra Phulra +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + c:AddMustBeRitualSummoned() + --Apply a "this turn, your opponent cannot activate cards or effects in response to the activation of your "Megalith" Ritual Monsters' effects" effect + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e,tp) return not Duel.HasFlagEffect(tp,id) end) + e1:SetCost(Cost.SelfReveal) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Negate the activation of an opponent's card or effect, and if you do, destroy that card, then if that effect targeted a card(s) on the field, you can Tribute 1 monster your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_RELEASE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev) return ep==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end) + e2:SetTarget(s.negtg) + e2:SetOperation(s.negop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MEGALITH} +s.mat_filter=Card.IsRitualMonster +function s.effop(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + local c=e:GetHandler() + aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2)) + --This turn, your opponent cannot activate cards or effects in response to the activation of your "Megalith" Ritual Monsters' effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e1:SetCode(EVENT_CHAINING) + e1:SetOperation(s.inactop) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.inactop(e,tp,eg,ep,ev,re,r,rp) + if ep==1-tp then return end + local trig_typ,trig_setcodes=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_SETCODES) + if trig_typ&(TYPE_RITUAL|TYPE_MONSTER)~=(TYPE_RITUAL|TYPE_MONSTER) then return end + for _,setcode in ipairs(trig_setcodes) do + if (SET_MEGALITH&0xfff)==(setcode&0xfff) and (SET_MEGALITH&setcode)==SET_MEGALITH then + return Duel.SetChainLimit(function(e,rp,tp) return rp==tp end) + end + end +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 + local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + if tg and tg:IsExists(Card.IsOnField,1,nil) then + e:SetLabel(100) + Duel.SetPossibleOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE) + else + e:SetLabel(0) + end +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) + and Duel.Destroy(eg,REASON_EFFECT)>0 and e:GetLabel()==100 + and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then + 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.BreakEffect() + Duel.Release(g,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/pre-release/c101302036.lua b/pre-release/c101302036.lua new file mode 100644 index 0000000000..058362801f --- /dev/null +++ b/pre-release/c101302036.lua @@ -0,0 +1,65 @@ +--剛鬼ザ・タイラント・オーガ +--Gouki The Tyrant Ogre +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Fusion Materials: 1 "Gouki" Link Monster + 1 Warrior, Dinosaur, or Cyberse monster + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR|RACE_DINOSAUR|RACE_CYBERSE)) + --Register the Link Rating of the materials used for its Fusion Summon + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetCode(EFFECT_MATERIAL_CHECK) + e0:SetValue(s.valcheck) + c:RegisterEffect(e0) + --Destroy cards on the field up to the total Link Rating of the "Gouki" Link Monsters used as material + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e:GetLabel()>0 end) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + e0:SetLabelObject(e1) + --If this card battles, your opponent cannot activate cards or effects until the end of the Damage Step + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EFFECT_CANNOT_ACTIVATE) + e2:SetRange(LOCATION_MZONE) + e2:SetTargetRange(0,1) + e2:SetValue(1) + e2:SetCondition(function(e) return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() end) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI} +function s.matfilter(c) + return c:IsSetCard(SET_GOUKI) and c:IsLinkMonster() +end +function s.valcheck(e,c) + local g=c:GetMaterial() + local total=g:Filter(Card.IsSetCard,nil,SET_GOUKI):GetSum(Card.GetLink) + local link3=g:IsExists(Card.IsLinkAbove,1,nil,3) and 100 or 0 + e:GetLabelObject():SetLabel(total,link3) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() end + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + local total,link3=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,total,nil) + if link3==100 then + Duel.SetChainLimit(function(te) return not Duel.GetTargetCards(e):IsContains(te:GetHandler()) end) + end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if #tg>0 then + Duel.Destroy(tg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c101302041.lua b/pre-release/c101302041.lua new file mode 100644 index 0000000000..8f251719c5 --- /dev/null +++ b/pre-release/c101302041.lua @@ -0,0 +1,84 @@ +--剛鬼ドラゴン・オーガ +--Gouki Dragon Ogre +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) + --Add 1 "Gouki" 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_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) + e1:SetTarget(s.deckthtg) + e1:SetOperation(s.deckthop) + c:RegisterEffect(e1) + --Add 1 "Gouki" monster with lower ATK than a targeted EARTH monster you control 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_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.gythtg) + e2:SetOperation(s.gythop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI} +function s.deckthfilter(c) + return c:IsSetCard(SET_GOUKI) and c:IsSpell() and c:IsAbleToHand() +end +function s.deckthtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.deckthop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.deckthfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +function s.earthfilter(c,tp) + return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.gythfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetAttack()) +end +function s.gythfilter(c,atk) + return c:IsSetCard(SET_GOUKI) and c:IsMonster() and c:GetAttack()0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --Your opponent's monsters can only target that face-up monster on your field for attacks + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_ONLY_ATTACK_MONSTER) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(0,LOCATION_MZONE) + e1:SetCondition(function(e) return e:GetHandler():IsControler(e:GetOwnerPlayer()) end) + e1:SetValue(function(e,c) return c==tc end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1,true) + end +end \ No newline at end of file diff --git a/pre-release/c101302050.lua b/pre-release/c101302050.lua new file mode 100644 index 0000000000..d341bd7ce3 --- /dev/null +++ b/pre-release/c101302050.lua @@ -0,0 +1,74 @@ +--剛鬼シーク・オーガ +--Gouki Sheik Ogre +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2 "Gouki" monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2,2) + --Special Summon any number of "Gouki" monsters from your hand with different Levels from each other + 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_DELAY) + e1:SetCode(EVENT_TO_HAND) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Fusion Summon 1 "Gouki" Fusion Monster from your Extra Deck, using monsters from your hand or field + local params={function(c) return c:IsSetCard(SET_GOUKI) end} + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(Fusion.SummonEffTG(params)) + e2:SetOperation(Fusion.SummonEffOP(params)) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI} +function s.spconfilter(c,tp) + return c:IsSetCard(SET_GOUKI) and c:IsMonster() and c:IsPreviousLocation(LOCATION_DECK) + and c:IsControler(tp) and not c:IsReason(REASON_DRAW) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_GOUKI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ft<=0 then return end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) + if #g==0 then return end + ft=math.min(ft,#g) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dpcheck(Card.GetLevel),1,tp,HINTMSG_SPSUMMON) + if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then + for sc in sg:Iter() do + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --You cannot Special Summon, except "Gouki" monsters, while you control any 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+EFFECT_FLAG_UNCOPYABLE) + 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 not c:IsSetCard(SET_GOUKI) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1,true) + end + end +end \ No newline at end of file diff --git a/pre-release/c101302056.lua b/pre-release/c101302056.lua new file mode 100644 index 0000000000..4862868f03 --- /dev/null +++ b/pre-release/c101302056.lua @@ -0,0 +1,75 @@ +--剛鬼闘魂 +--Gouki Fighting Spirit +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + --When this card is activated: You can Special Summon 1 Level 4 or lower EARTH monster (Warrior, Dinosaur, or Cyberse) from your hand in Defense Position + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) + --Special Summon 1 "Dinowrestler" or "G Golem" monster from your Deck or Extra Deck + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.deckexspcost) + e2:SetTarget(s.deckexsptg) + e2:SetOperation(s.deckexspop) + c:RegisterEffect(e2) +end +s.listed_series={SET_GOUKI,SET_DINOWRESTLER,SET_G_GOLEM} +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function s.handspfilter(c,e,tp) + return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR|RACE_DINOSAUR|RACE_CYBERSE) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local g=Duel.GetMatchingGroup(s.handspfilter,tp,LOCATION_HAND,0,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.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) + end + end +end +function s.deckexcostfilter(c,e,tp) + return c:IsLinkAbove(3) and c:IsSetCard(SET_GOUKI) + and Duel.IsExistingMatchingCard(s.deckexspfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,c) +end +function s.deckexspfilter(c,e,tp,cost_card) + if not (c:IsSetCard({SET_DINOWRESTLER,SET_G_GOLEM}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if c:IsLocation(LOCATION_DECK) then + return Duel.GetMZoneCount(tp,cost_card)>0 + elseif c:IsLocation(LOCATION_EXTRA) then + return Duel.GetLocationCountFromEx(tp,tp,cost_card,c)>0 + end +end +function s.deckexspcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.deckexcostfilter,1,false,nil,nil,e,tp) end + local g=Duel.SelectReleaseGroupCost(tp,s.deckexcostfilter,1,1,false,nil,nil,e,tp) + Duel.Release(g,REASON_COST) +end +function s.deckexsptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.deckexspop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.deckexspfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/pre-release/c101302061.lua b/pre-release/c101302061.lua new file mode 100644 index 0000000000..f86aad1ed9 --- /dev/null +++ b/pre-release/c101302061.lua @@ -0,0 +1,84 @@ +--絢嵐たる献詠 +--Magnifistorming Stanza Tribute +--scripted by Naim +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_SEARCH+CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Set this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +s.listed_series={SET_MAGNIFISTORM} +function s.thfilter1(c) + return c:IsLevelBelow(4) and c:IsSetCard(SET_MAGNIFISTORM) and c:IsAbleToHand() +end +function s.thfilter2(c) + return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) and not Duel.HasFlagEffect(tp,id) + local b2=Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) 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,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Add 1 Level 4 or lower "Magnifistorm" monster from your Deck to your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter1,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + elseif op==2 then + --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end diff --git a/pre-release/c101302062.lua b/pre-release/c101302062.lua new file mode 100644 index 0000000000..ebf57437bf --- /dev/null +++ b/pre-release/c101302062.lua @@ -0,0 +1,84 @@ +--絢嵐たる顕現 +--Magnifistorming Summoning Technique +--scripted by Naim +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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Set this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +s.listed_series={SET_MAGNIFISTORM} +function s.tgfilter(c) + return c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster() and c:IsAbleToGrave() +end +function s.thfilter(c) + return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) and not Duel.HasFlagEffect(tp,id) + local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) 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,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_TOGRAVE) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + elseif op==2 then + e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Send 1 "Magnifistorm" monster 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 + elseif op==2 then + --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end diff --git a/pre-release/c101302063.lua b/pre-release/c101302063.lua new file mode 100644 index 0000000000..f682f289f3 --- /dev/null +++ b/pre-release/c101302063.lua @@ -0,0 +1,97 @@ +--絢嵐たる見神 +--Magnifistorming Sight Trance +--scripted by Naim +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:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Set this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_DESTROYED) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetTarget(s.settg) + e2:SetOperation(s.setop) + c:RegisterEffect(e2) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +s.listed_series={SET_MAGNIFISTORM} +function s.tgfilter(c) + return c:IsSetCard(SET_MAGNIFISTORM) and c:IsMonster() and c:IsAbleToGrave() +end +function s.thfilter(c) + return c:IsCode(CARD_MYSTICAL_SPACE_TYPHOON) and c:IsAbleToHand() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsPlayerCanDraw(tp,2) and not Duel.HasFlagEffect(tp,id) + local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) 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,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,2) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1) + elseif op==2 then + e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + end +end +function s.discardfilter(c) + return (c:IsSetCard(SET_MAGNIFISTORM) or c:IsQuickPlaySpell()) and c:IsDiscardable(REASON_EFFECT) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Draw 2 cards, then discard 1 "Magnifistorm" card or 1 Quick-Play Spell, or, if you do not have any in your hand, discard your entire hand + if Duel.Draw(tp,2,REASON_EFFECT)>0 then + Duel.ShuffleHand(tp) + Duel.BreakEffect() + local handg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) + if handg:IsExists(s.discardfilter,1,nil) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) + local dg=handg:FilterSelect(tp,s.discardfilter,1,1,nil) + if #dg>0 then + Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) + end + else + Duel.SendtoGrave(handg,REASON_EFFECT|REASON_DISCARD) + end + end + elseif op==2 then + --Add 1 "Mystical Space Typhoon" from your Deck or GY to your hand + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end + end +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end \ No newline at end of file diff --git a/pre-release/c101302065.lua b/pre-release/c101302065.lua new file mode 100644 index 0000000000..1b968a6e77 --- /dev/null +++ b/pre-release/c101302065.lua @@ -0,0 +1,85 @@ +--幸せの多重奏 +--Solfachord Happiness +--Scripted by Hatter +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) + c:RegisterEffect(e1) +end +s.listed_names={id} +s.listed_series={SET_SOLFACHORD} +function s.thfilter(c) + return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id+100) + and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler(),REASON_EFFECT) + and Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil):GetClassCount(Card.GetScale)>=2 + local b2=not Duel.HasFlagEffect(tp,id+200) + and Pendulum.PlayerCanGainAdditionalPendulumSummon(tp,id) + local b3=not Duel.HasFlagEffect(tp,id+300) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 + and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_PZONE,0,2,nil,e,tp) + if chk==0 then return b1 or b2 or b3 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}, + {b3,aux.Stringid(id,3)}) + e:SetLabel(op) + Duel.RegisterFlagEffect(tp,id+op*100,RESET_PHASE|PHASE_END,0,1) + if op==1 then + e:SetCategory(CATEGORY_HANDES+CATEGORY_TOHAND+CATEGORY_SEARCH) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) + elseif op==2 then + e:SetCategory(0) + elseif op==3 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_PZONE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Discard 1 card, and if you do, add 2 "Solfachord" Pendulum Monsters with different Pendulum Scales from your Deck to your hand + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)==0 then return end + local dg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + local sdg=aux.SelectUnselectGroup(dg,e,tp,2,2,aux.dpcheck(Card.GetScale),1,tp,HINTMSG_ATOHAND) + if #sdg~=2 or Duel.SendtoHand(sdg,nil,REASON_EFFECT)~=2 then return end + Duel.ConfirmCards(1-tp,sdg:Match(Card.IsLocation,nil,LOCATION_HAND)) + Duel.ShuffleHand(tp) + local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) + if ct==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,4)) then return end + ct=math.min(ct,Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)+1) + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local shg=hg:Select(tp,1,ct,nil) + if #shg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(shg,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + --During your Main Phase this turn, you can conduct 1 Pendulum Summon of a "Solfachord" monster(s) in addition to your Pendulum Summon + Pendulum.GrantAdditionalPendulumSummon(e:GetHandler(),function(c) return c:IsSetCard(SET_SOLFACHORD) end,tp,LOCATION_HAND|LOCATION_EXTRA,aux.Stringid(id,5),aux.Stringid(id,6),id) + elseif op==3 then + --Special Summon 2 "Solfachord" cards from your Pendulum Zone + if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_PZONE,0,nil,e,tp) + if #g==2 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/c101302066.lua b/pre-release/c101302066.lua new file mode 100644 index 0000000000..ec3cab8c80 --- /dev/null +++ b/pre-release/c101302066.lua @@ -0,0 +1,103 @@ +--メガリス・アナスタシス +--Megalith Anastasis +--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) + --Add 2 "Megalith" monsters (1 Level 4 or lower and 1 Level 8 or higher) 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_SZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.Discard()) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Activate 1 of these effects + 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_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(s.effcon) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_MEGALITH} +function s.thfilter(c) + return (c:IsLevelBelow(4) or c:IsLevelAbove(8)) and c:IsSetCard(SET_MEGALITH) and c:IsAbleToHand() +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsLevelBelow,1,nil,4) and sg:IsExists(Card.IsLevelAbove,1,nil,8) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_ATOHAND) + if #sg>0 then + Duel.SendtoHand(sg,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,sg) + end +end +function s.effconfilter(c,tp) + return c:IsSummonPlayer(tp) and c:IsRitualSummoned() and c:IsSetCard(SET_MEGALITH) and c:IsFaceup() +end +function s.effcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.effconfilter,1,nil,tp) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=not Duel.HasFlagEffect(tp,id) + and Duel.IsPlayerCanDraw(tp,2) + local b2=not Duel.HasFlagEffect(tp,id+100) + and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,2) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1) + elseif op==2 then + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END,0,1) + e:SetCategory(CATEGORY_RELEASE) + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --Draw 2 cards, then discard 1 card + if Duel.Draw(tp,2,REASON_EFFECT)==2 then + Duel.ShuffleHand(tp) + Duel.BreakEffect() + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) + end + elseif op==2 then + --Tribute 1 monster your opponent controls + 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 +end \ No newline at end of file diff --git a/pre-release/c101302076.lua b/pre-release/c101302076.lua new file mode 100644 index 0000000000..565395848d --- /dev/null +++ b/pre-release/c101302076.lua @@ -0,0 +1,122 @@ +--絢嵐たる権能 +--Magnifistorming Sovereign Tyranny +--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) + --Apply these effects in sequence + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetRange(LOCATION_SZONE) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Negate the effects 1 face-up card your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --Set this card + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,id) + e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsCode(CARD_MYSTICAL_SPACE_TYPHOON) end) + e3:SetTarget(s.settg) + e3:SetOperation(s.setop) + c:RegisterEffect(e3) +end +s.listed_names={CARD_MYSTICAL_SPACE_TYPHOON} +s.listed_series={SET_MAGNIFISTORM} +function s.tdfilter(c,e) + return c:IsQuickPlaySpell() and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsSetCard,1,nil,SET_MAGNIFISTORM) +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil,e) + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) + and #g>=3 and g:IsExists(Card.IsSetCard,1,nil,SET_MAGNIFISTORM) + end + local tg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_TODECK) + Duel.SetTargetCard(tg) + Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,tp,0) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + Duel.SetPossibleOperationInfo(0,CATEGORY_ATKCHANGE,nil,0,tp,300) + Duel.SetPossibleOperationInfo(0,CATEGORY_DEFCHANGE,nil,0,tp,300) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local break_chk=false + local tg=Duel.GetTargetCards(e) + if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then + break_chk=true + Duel.ShuffleDeck(tp) + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) + end + if break_chk then Duel.BreakEffect() end + local c=e:GetHandler() + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3)) + --WIND monsters you control will gain 300 ATK/DEF for the rest of this turn + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsAttribute(ATTRIBUTE_WIND) end) + e1:SetValue(300) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + local e2=e1:Clone() + e2:SetCode(EFFECT_UPDATE_DEFENSE) + Duel.RegisterEffect(e2,tp) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and c:IsControler(1-tp) and chkc:IsNegatable() end + if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --Negate its effects + tc:NegateEffects(e:GetHandler(),nil,true) + end +end +function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsSSetable() end + if c:IsLocation(LOCATION_GRAVE) then + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,0) + end +end +function s.setop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SSet(tp,c) + end +end diff --git a/pre-release/c101302101.lua b/pre-release/c101302101.lua new file mode 100644 index 0000000000..aef09c86fb --- /dev/null +++ b/pre-release/c101302101.lua @@ -0,0 +1,78 @@ +--DDランス・ソルジャー +--D/D Lance Soldier +--Scripted by Hatter +local s,id=GetID() +function s.initial_effect(c) + --Increase the Level of 1 "D/D" monster you control by up to the number of "Dark Contract" cards in your field and GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.lvtg) + e1:SetOperation(s.lvop) + c:RegisterEffect(e1) + --Destroy 1 "Dark Contract" card you control, and if you do, Special Summon this card + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DARK_CONTRACT} +function s.lvfilter(c) + return c:IsSetCard(SET_DD) and c:HasLevel() and c:IsFaceup() +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:HasLevel() then return end + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_DARK_CONTRACT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) + if ct==0 then return end + local lv=Duel.AnnounceLevel(tp,1,ct) + if lv then + tc:UpdateLevel(lv,nil,e:GetHandler()) + end +end +function s.desfilter(c,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 +end +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 s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsRelateToEffect(e) + and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --Banish it when it leaves the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(3300) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) + e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) + c:RegisterEffect(e1,true) + end +end \ No newline at end of file diff --git a/pre-release/c101302102.lua b/pre-release/c101302102.lua new file mode 100644 index 0000000000..e331afd54a --- /dev/null +++ b/pre-release/c101302102.lua @@ -0,0 +1,102 @@ +--DDディフェンス・ソルジャー +--D/D Defense Soldier +--Scripted by Hatter +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_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) + c:RegisterEffect(e1) + --Add 1 "D/D" Pendulum Monster from your face-up Extra Deck or 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:SetCost(Cost.SelfBanish) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DDD} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.limcostfilter(c) + return c:IsSetCard(SET_DD) and c:IsMonster() and c:IsAbleToRemoveAsCost() +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) + local b2=not Duel.HasFlagEffect(tp,id) + and Duel.IsExistingMatchingCard(s.limcostfilter,tp,LOCATION_GRAVE,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + e:SetProperty(EFFECT_FLAG_CARD_TARGET) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) + elseif op==2 then + e:SetCategory(0) + e:SetProperty(0) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.limcostfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) + end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) + local op=e:GetLabel() + if op==1 then + --Special Summon 1 "D/D" card in your Pendulum Zone + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end + elseif op==2 then + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --If your "D/D/D" monster attacks this turn, your opponent cannot activate cards or effects until the end of the Damage Step + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,4)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(0,1) + e1:SetCondition(s.actcon) + e1:SetValue(1) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + end +end +function s.actcon(e) + local tc=Duel.GetAttacker() + return tc and tc:IsSetCard(SET_DDD) and tc:IsControler(e:GetHandlerPlayer()) +end +function s.thfilter(c) + return c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/pre-release/c101302103.lua b/pre-release/c101302103.lua new file mode 100644 index 0000000000..98f9147c64 --- /dev/null +++ b/pre-release/c101302103.lua @@ -0,0 +1,104 @@ +--DDD零死王ゼロ・マキナ +--D/D/D Zero Demise King Zero Machinex +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + --Pendulum Summon procedure + Pendulum.AddProcedure(c,false) + --Check if it was activated this turn + local e0=Effect.CreateEffect(c) + e0:SetDescription(1160) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + e0:SetRange(LOCATION_HAND) + e0:SetCost(s.actreg) + c:RegisterEffect(e0) + --Place 1 "Dark Contract" Continuous Spell/Trap on the field + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) + e1:SetTarget(s.pltg) + e1:SetOperation(s.plop) + c:RegisterEffect(e1) + --Special Summon this card from the Extra Deck if a "Dark Contract" or "D/D/D" card(s) is destroyed + 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+EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_DESTROYED) + e2:SetRange(LOCATION_EXTRA) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Place this card in the Pendulum Zone if it's destroyed + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_DESTROYED) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) + e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e3:SetOperation(s.penop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DARK_CONTRACT,SET_DDD} +s.listed_names={id} +function s.actreg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) +end +function s.plfilter(c,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsContinuousSpellTrap() and not c:IsForbidden() and c:CheckUniqueOnField(tp) +end +function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,tp) 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_DECK,0,1,1,nil,tp):GetFirst() + if sc then + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + end +end +function s.spconfilter(c,tp) + return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and not c:IsPreviousCodeOnField(id) + and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard({SET_DDD,SET_DARK_CONTRACT}) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spconfilter,1,nil,tp) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,c)>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,PLAYER_EITHER,LOCATION_ONFIELD) +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(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + 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,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.BreakEffect() + Duel.Destroy(g,REASON_EFFECT) + end + end +end +function s.penop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + end +end \ No newline at end of file diff --git a/pre-release/c101302104.lua b/pre-release/c101302104.lua new file mode 100644 index 0000000000..73710e3b3b --- /dev/null +++ b/pre-release/c101302104.lua @@ -0,0 +1,171 @@ +--DDDD偉次元王アーク・クライシス +--D/D/D/D Great Dimension King Arc Crisis +--Scripted by The Razgriz +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Pendulum Summon procedure + Pendulum.AddProcedure(c,false) + --Fusion Materials: 4 Fiend monsters (1 Fusion, 1 Synchro, 1 Xyz, 1 Pendulum) + Fusion.AddProcMix(c,true,true,s.matfilter(TYPE_FUSION),s.matfilter(TYPE_SYNCHRO),s.matfilter(TYPE_XYZ),s.matfilter(TYPE_PENDULUM)) + --Special Summon this card (from your Extra Deck) by banishing the above materials from your field and/or GY + Fusion.AddContactProc(c,s.contactfil,s.contactop,false) + c:AddMustBeFusionSummoned() + --You can only Fusion Summon or Special Summon by its alternate procedure "D/D/D/D Great Dimension King Arc Crisis" once per turn + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e0:SetCode(EVENT_SPSUMMON_SUCCESS) + e0:SetCondition(s.regcon) + e0:SetOperation(s.regop) + c:RegisterEffect(e0) + --Destroy "Dark Contract" cards you control to Special Summon "Doom King" monsters from your Deck/Extra Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Negate the effects of all face-up monsters your opponent currently controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DISABLE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) + c:RegisterEffect(e2) + --Can attack all monsters your opponent controls once each + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_ATTACK_ALL) + e3:SetValue(1) + c:RegisterEffect(e3) + --Place this card in your Pendulum Zone + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY) + e4:SetCode(EVENT_DESTROYED) + e4:SetCountLimit(1,{id,2}) + e4:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end) + e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end end) + e4:SetOperation(s.penop) + c:RegisterEffect(e4) +end +s.listed_series={SET_DARK_CONTRACT,SET_DOOM_KING} +s.miracle_synchro_fusion=true +function s.matfilter(typ) + return function(c,fc,sumtype,tp) + return c:IsRace(RACE_FIEND,fc,sumtype,tp) and c:IsType(typ,fc,sumtype,tp) + end +end +function s.contactfil(tp) + local loc=LOCATION_ONFIELD|LOCATION_GRAVE + if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then loc=LOCATION_ONFIELD end + return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,loc,0,nil) +end +function s.contactop(g) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) +end +function s.regcon(e) + local c=e:GetHandler() + return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1) +end +function s.regop(e,tp,eg,ep,ev,re,r,rp) + --Prevent another Fusion Summon or Special Summon by its alternate procedure of "Dark Magician of Destruction" that turn + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCode(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.desfilter(c,e,tp) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,dc) +end +function s.spfilter(c,e,tp,dc) + if not (c:IsSetCard(SET_DOOM_KING) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + return (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,dc)>0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,dc,c)>0) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCountFromEx(tp,tp) + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and chkc:IsFaceup() and s.desfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end + local ct=Duel.GetMatchingGroupCount(s.desfilter,tp,LOCATION_ONFIELD,0,nil,e,tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,ct,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) +end +function s.rescon(mmz_ct,linkmz_ct) + return function(sg,e,tp,mg) + return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=mmz_ct + and sg:FilterCount(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil)<=linkmz_ct + end +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tg=Duel.GetTargetCards(e) + if tg==0 then return end + local ct=Duel.Destroy(tg,REASON_EFFECT) + if ct==0 then return end + local mmz_ct=Duel.GetLocationCount(tp,LOCATION_MZONE) + local emz_ct=Duel.GetLocationCountFromEx(tp,tp,nil,nil,ZONES_EMZ) + local linkmz_ct=Duel.GetLocationCountFromEx(tp,tp) + local ft=math.min(mmz_ct+emz_ct,ct) + if ft<=0 then return end + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp) + if #g==0 then return end + local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(mmz_ct,linkmz_ct),1,tp,HINTMSG_SPSUMMON) + if #sg==0 then return end + local fup,fdown=sg:Split(aux.FaceupFilter(Card.IsLocation,LOCATION_EXTRA),nil) + local fdown_main,fdown_ex=fdown:Split(Card.IsLocation,nil,LOCATION_DECK) + local priority_0,priority_1 + if linkmz_ct0 + and Duel.IsExistingTarget(s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,REMOVED_AND_OR_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.HasFlagEffect(tp,id) end +end +function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + --If your "D/D" monster attacks a Defense Position monster this turn, inflict piercing battle damage to your opponent + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_PIERCE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_DD) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end \ No newline at end of file diff --git a/pre-release/c101302106.lua b/pre-release/c101302106.lua new file mode 100644 index 0000000000..1c2bff4300 --- /dev/null +++ b/pre-release/c101302106.lua @@ -0,0 +1,85 @@ +--DDD智慧王ソロモン +--D/D/D Wisdom King Solomon +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 4 "D/D" monsters + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),4,2) + --Add 1 "D/D" card from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCost(Cost.Detach(1)) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1,false,EFFECT_MARKER_DETACH_XMAT) + --A targeted "D/D" Effect Monster gains an effect until the end of this turn + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_REMOVE) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.efftg) + e2:SetOperation(s.effop) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD} +function s.thfilter(c) + return c:IsSetCard(SET_DD) 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.tgfilter(c) + return c:IsSetCard(SET_DD) and c:IsType(TYPE_EFFECT) and c:IsFaceup() +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_MZONE) and s.tgfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) + Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + --Inflict damage to your opponent equal to the original ATK of a monster this card destroys a monster by battle + local e1=Effect.CreateEffect(tc) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetCategory(CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetCode(EVENT_BATTLE_DESTROYING) + e1:SetCondition(aux.bdcon) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + e1:SetReset(RESETS_STANDARD_PHASE_END) + tc:RegisterEffect(e1) + end +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() + if dam<0 then dam=0 end + Duel.SetTargetPlayer(1-tp) + Duel.SetTargetParam(dam) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Damage(p,d,REASON_EFFECT) +end \ No newline at end of file diff --git a/pre-release/c101302107.lua b/pre-release/c101302107.lua new file mode 100644 index 0000000000..d33e3a2283 --- /dev/null +++ b/pre-release/c101302107.lua @@ -0,0 +1,70 @@ +--DDD天空王ゼウス・ラグナロク +--D/D/D Sky King Zeus Ragnarok +--scripted by Naim +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure: 2+ "D/D" monsters + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),2) + --Destroy 1 "D/D" or "Dark Contract" card you control, also, you can conduct 1 Pendulum Summon of a "D/D" monster(s) in addition to your Pendulum Summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_MZONE) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Negate the activation of monster effect your opponent activates in the hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_NEGATE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e2:SetCode(EVENT_CHAINING) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(s.negcon) + e2:SetCost(s.negcost) + e2:SetTarget(s.negtg) + e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) end) + c:RegisterEffect(e2) +end +s.listed_series={SET_DD,SET_DARK_CONTRACT} +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsSetCard({SET_DD,SET_DARK_CONTRACT}) and chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() end + if chk==0 then return not Duel.HasFlagEffect(tp,id) --pending rulings on whether you can use this effect if you've already performed an extra Pendulum Summon or not + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,{SET_DD,SET_DARK_CONTRACT}),tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end + Pendulum.GrantAdditionalPendulumSummon(e:GetHandler(),function(c) return c:IsSetCard(SET_DD) end,tp,LOCATION_HAND|LOCATION_EXTRA,aux.Stringid(id,2),aux.Stringid(id,3),id) +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + local trig_loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) + return ep==1-tp and re:IsMonsterEffect() and trig_loc==LOCATION_HAND + and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) +end +function s.negcostfilter(c) + return (c:IsSetCard(SET_DARK_CONTRACT) or (c:IsSetCard(SET_DD) and c:IsMonster())) and c:IsAbleToRemoveAsCost() +end +function s.rescon(sg,e,tp,mg) + return sg:IsExists(Card.IsSetCard,1,nil,SET_DARK_CONTRACT) and sg:IsExists(function(c) return c:IsSetCard(SET_DD) and c:IsMonster() end,1,nil) +end +function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(s.negcostfilter,tp,LOCATION_GRAVE,0,nil) + if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end + local rg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE) + Duel.Remove(rg,POS_FACEUP,REASON_COST) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) +end \ No newline at end of file diff --git a/pre-release/c101302108.lua b/pre-release/c101302108.lua new file mode 100644 index 0000000000..f860d7103f --- /dev/null +++ b/pre-release/c101302108.lua @@ -0,0 +1,81 @@ +--零王の契約書 +--Dark Contract with the Zero King +--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) + --Destroy 1 "DD" card you control, except "Dark Contract with the Zero King", and if you do, Special Summon 1 "D/D" monster from your Deck + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.destg) + e1:SetOperation(s.desop) + c:RegisterEffect(e1) + --Take 1000 damage + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetTarget(s.damtg) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) +end +s.listed_names={id} +s.listed_series={SET_DD} +function s.desfilter(c,tp) + return c:IsSetCard(SET_DD) and not c:IsCode(id) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.desfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + --You cannot Special Summon for the rest of this turn, except "D/D" 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:IsSetCard(SET_DD) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1000) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,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/c101302109.lua b/pre-release/c101302109.lua new file mode 100644 index 0000000000..a30b3256ec --- /dev/null +++ b/pre-release/c101302109.lua @@ -0,0 +1,95 @@ +--異次元の契約書 +--Dark Contract with the Different Dimension +--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) + --Take 1000 damage + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DAMAGE) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetRange(LOCATION_SZONE) + e1:SetCountLimit(1) + e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e1:SetTarget(s.damtg) + e1:SetOperation(s.damop) + c:RegisterEffect(e1) + --Banish 1 card in your opponent's field or GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_REMOVE) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_SZONE) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCountLimit(1,id) + e2:SetCost(s.rmcost) + e2:SetTarget(s.rmtg) + e2:SetOperation(s.rmop) + c:RegisterEffect(e2) + --Gain 500 LP + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_RECOVER) + 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.lptg) + e3:SetOperation(s.lpop) + c:RegisterEffect(e3) +end +s.listed_series={SET_DARK_CONTRACT} +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1000) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,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 +function s.rmcostfilter(c) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToDeckAsCost() +end +function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.rmcostfilter,tp,LOCATION_GRAVE,0,2,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectMatchingCard(tp,s.rmcostfilter,tp,LOCATION_GRAVE,0,2,2,nil) + Duel.HintSelection(g) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) +end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) +end +function s.rmop(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.lptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(500) + Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,500) +end +function s.lpop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + if Duel.Recover(p,d,REASON_EFFECT)>0 and rp==1-tp and r&REASON_EFFECT>0 then + Duel.BreakEffect() + Duel.Recover(p,500,REASON_EFFECT) + end +end \ No newline at end of file