Commit 6c475043 authored by Vury Leo's avatar Vury Leo

Add all accel synchro

parent ac140537
--水晶機巧-シトリィ --水晶機巧-シトリィ
function c20050865.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(20050865,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,20050865) e1:SetCountLimit(1,id)
e1:SetCondition(c20050865.sccon) e1:SetCondition(s.sccon)
e1:SetTarget(c20050865.sctg) e1:SetTarget(s.sctg)
e1:SetOperation(c20050865.scop) e1:SetOperation(s.scop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c20050865.sccon(e,tp,eg,ep,ev,re,r,rp) function s.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
end end
function c20050865.scfilter1(c,e,tp,mc) function s.scfilter1(c,e,tp,mc)
local mg=Group.FromCards(c,mc) local mg=Group.FromCards(c,mc)
return not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c20050865.scfilter2,tp,LOCATION_EXTRA,0,1,nil,mg) and Duel.IsExistingMatchingCard(s.scfilter2,tp,LOCATION_EXTRA,0,1,nil,mg)
end end
function c20050865.scfilter2(c,mg) function s.scfilter2(c,mg)
return c:IsRace(RACE_MACHINE) and c:IsSynchroSummonable(nil,mg) return c:IsRace(RACE_MACHINE) and c:IsSynchroSummonable(nil,mg)
end end
function c20050865.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c20050865.scfilter1(chkc,e,tp,e:GetHandler()) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.scfilter1(chkc,e,tp,e:GetHandler()) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c20050865.scfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler()) end and Duel.IsExistingTarget(s.scfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c20050865.scfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetHandler()) local g=Duel.SelectTarget(tp,s.scfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c20050865.scop(e,tp,eg,ep,ev,re,r,rp) function s.scop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
...@@ -56,19 +57,29 @@ function c20050865.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,19 +57,29 @@ function c20050865.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.AdjustAll() Duel.AdjustAll()
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(c20050865.scfilter2,tp,LOCATION_EXTRA,0,nil,mg) local g=Duel.GetMatchingGroup(s.scfilter2,tp,LOCATION_EXTRA,0,nil,mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local opt=Duel.SelectOption(tp,1164,1379)
local sg=g:Select(tp,1,1,nil) if opt==0 then
local e1=Effect.CreateEffect(c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) local sg=g:Select(tp,1,1,nil)
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetValue(LOCATION_REMOVED) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
c:RegisterEffect(e1,true) e1:SetValue(LOCATION_REMOVED)
local e2=e1:Clone() e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e2,true) c:RegisterEffect(e1,true)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) local e2=e1:Clone()
tc:RegisterEffect(e2,true)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
else
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
synfilter=function(stc) return stc:IsRace(RACE_MACHINE) end,
mg=mg,
material_operation=AccelSynchro.SYNCHRO_OPERATION_BANISH,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end end
end end
--ジャンク・アンカー --ジャンク・アンカー
function c25148255.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--synchro --synchro
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(25148255,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c25148255.sccost) e1:SetCost(s.sccost)
e1:SetTarget(c25148255.sctg) e1:SetTarget(s.sctg)
e1:SetOperation(c25148255.scop) e1:SetOperation(s.scop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -19,29 +20,29 @@ function c25148255.initial_effect(c) ...@@ -19,29 +20,29 @@ function c25148255.initial_effect(c)
e2:SetCode(20932152) e2:SetCode(20932152)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c25148255.sccost(e,tp,eg,ep,ev,re,r,rp,chk) function s.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST)
end end
function c25148255.mfilter(c,e,tp,mc) function s.mfilter(c,e,tp,mc)
local mg=Group.FromCards(c,mc) local mg=Group.FromCards(c,mc)
return c:IsSetCard(0x43) and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x43) and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c25148255.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg) and Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
end end
function c25148255.scfilter(c,mg,tp) function s.scfilter(c,mg,tp)
return aux.IsMaterialListSetCard(c,0x1017) and c:IsSynchroSummonable(nil,mg) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0 return aux.IsMaterialListSetCard(c,0x1017) and c:IsSynchroSummonable(nil,mg) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end end
function c25148255.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c25148255.mfilter(chkc,e,tp,c) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.mfilter(chkc,e,tp,c) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c25148255.mfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) end and Duel.IsExistingTarget(s.mfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
Duel.SelectTarget(tp,c25148255.mfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c) Duel.SelectTarget(tp,s.mfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c25148255.scop(e,tp,eg,ep,ev,re,r,rp) function s.scop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
...@@ -50,19 +51,29 @@ function c25148255.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,19 +51,29 @@ function c25148255.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.AdjustAll() Duel.AdjustAll()
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(c25148255.scfilter,tp,LOCATION_EXTRA,0,nil,mg,tp) local g=Duel.GetMatchingGroup(s.scfilter,tp,LOCATION_EXTRA,0,nil,mg,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local opt=Duel.SelectOption(tp,1164,1379)
local sg=g:Select(tp,1,1,nil) if opt==0 then
local e1=Effect.CreateEffect(c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) local sg=g:Select(tp,1,1,nil)
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetValue(LOCATION_REMOVED) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
c:RegisterEffect(e1,true) e1:SetValue(LOCATION_REMOVED)
local e2=e1:Clone() e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e2,true) c:RegisterEffect(e1,true)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) local e2=e1:Clone()
tc:RegisterEffect(e2,true)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
else
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
synfilter=function(stc) return aux.IsMaterialListSetCard(stc,0x1017)==true end,
mg=mg,
material_operation=AccelSynchro.SYNCHRO_OPERATION_BANISH,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end end
end end
...@@ -47,30 +47,30 @@ function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,30 +47,30 @@ function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function s.scop(e,tp,eg,ep,ev,re,r,rp) function s.scop(e,tp,eg,ep,ev,re,r,rp)
local opt=Duel.SelectOption(tp,1164,1379) local mg=Duel.GetSynchroMaterial(tp)
if opt==0 then if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg=Duel.GetSynchroMaterial(tp) local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg:IsExists(Card.GetHandSynchro,1,nil) then if mg2:GetCount()>0 then mg:Merge(mg2) end
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil) end
if mg2:GetCount()>0 then mg:Merge(mg2) end local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,tp,mg)
end if g:GetCount()>0 then
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,tp,mg) local opt=Duel.SelectOption(tp,1164,1379)
if g:GetCount()>0 then if opt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst() local sc=sg:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tg=mg:SelectSubGroup(tp,s.syncheck,false,2,#mg,tp,sc) local tg=mg:SelectSubGroup(tp,s.syncheck,false,2,#mg,tp,sc)
Duel.SynchroSummon(tp,sc,nil,tg,#tg-1,#tg-1) Duel.SynchroSummon(tp,sc,nil,tg,#tg-1,#tg-1)
else
local c=e:GetHandler()
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
additional_scheck=function(sg)
return sg:IsExists(function(mc) return mc:IsRace(RACE_DRAGON) end,1,nil)
end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end end
else
local c=e:GetHandler()
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
additional_scheck=function(sg)
return sg:IsExists(function(mc) return mc:IsRace(RACE_DRAGON) end,1,nil)
end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.rmcon(e) function s.rmcon(e)
......
--ジャンク・ウォリアー --ジャンク・ウォリアー
function c60800381.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
aux.AddMaterialCodeList(c,63977008) aux.AddMaterialCodeList(c,63977008)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,c60800381.tfilter,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,s.tfilter,aux.NonTuner(nil),1)
Synchro.AddSynchroProcedure(c,{
tuner_filter=s.tfilter,
})
c:EnableReviveLimit() c:EnableReviveLimit()
--atkup --atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60800381,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c60800381.con) e1:SetCondition(s.con)
e1:SetOperation(c60800381.op) e1:SetOperation(s.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c60800381.material_setcode=0x1017 s.material_setcode=0x1017
function c60800381.tfilter(c) function s.tfilter(c)
return c:IsCode(63977008) or c:IsHasEffect(20932152) return c:IsCode(63977008) or c:IsHasEffect(20932152)
end end
function c60800381.con(e,tp,eg,ep,ev,re,r,rp) function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c60800381.filter(c) function s.filter(c)
return c:IsFaceup() and c:IsLevelBelow(2) return c:IsFaceup() and c:IsLevelBelow(2)
end end
function c60800381.op(e,tp,eg,ep,ev,re,r,rp) function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60800381.filter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 and c:IsFaceup() and c:IsRelateToEffect(e) then if g:GetCount()>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=0 local atk=0
local tc=g:GetFirst() local tc=g:GetFirst()
......
--SRアクマグネ --SRアクマグネ
function c62899696.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--cannot be synchro --cannot be synchro
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c62899696.smcon) e1:SetCondition(s.smcon)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--synchro summon --synchro summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(62899696,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,62899696) e2:SetCountLimit(1,id)
e2:SetCondition(c62899696.spcon) e2:SetCondition(s.spcon)
e2:SetTarget(c62899696.sptg) e2:SetTarget(s.sptg)
e2:SetOperation(c62899696.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c62899696.smcon(e) function s.smcon(e)
return e:GetHandler():GetFlagEffect(62899696)==0 return e:GetHandler():GetFlagEffect(id)==0
end end
function c62899696.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
and bit.band(Duel.GetCurrentPhase(),PHASE_MAIN1+PHASE_MAIN2)>0 and bit.band(Duel.GetCurrentPhase(),PHASE_MAIN1+PHASE_MAIN2)>0
end end
function c62899696.filter(tc,c,tp) function s.filter(tc,c,tp)
if tc:IsFacedown() or not tc:IsCanBeSynchroMaterial() then return false end if tc:IsFacedown() or not tc:IsCanBeSynchroMaterial() then return false end
c:RegisterFlagEffect(62899696,0,0,1) c:RegisterFlagEffect(id,0,0,1)
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
local res=Duel.IsExistingMatchingCard(c62899696.synfilter,tp,LOCATION_EXTRA,0,1,nil,mg) local res=Duel.IsExistingMatchingCard(s.synfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
c:ResetFlagEffect(62899696) c:ResetFlagEffect(id)
return res return res
end end
function c62899696.synfilter(c,mg) function s.synfilter(c,mg)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroSummonable(nil,mg) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroSummonable(nil,mg)
end end
function c62899696.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c62899696.filter(chkc,e:GetHandler(),tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc,e:GetHandler(),tp) end
if chk==0 then return Duel.IsExistingTarget(c62899696.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler(),tp) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c62899696.filter,tp,0,LOCATION_MZONE,1,1,nil,e:GetHandler(),tp) Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c62899696.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) if c:IsFaceup() and c:IsRelateToEffect(e)
and tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then and tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
c:RegisterFlagEffect(62899696,RESET_EVENT+RESETS_STANDARD,0,1) c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.GetMatchingGroup(s.synfilter,tp,LOCATION_EXTRA,0,nil,mg)
local g=Duel.SelectMatchingCard(tp,c62899696.synfilter,tp,LOCATION_EXTRA,0,1,1,nil,mg) if g:GetCount()>0 then
local sc=g:GetFirst() local opt=Duel.SelectOption(tp,1164,1379)
if sc then if opt==0 then
Duel.SynchroSummon(tp,sc,nil,mg) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
else
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
synfilter=function(stc) return stc:IsAttribute(ATTRIBUTE_WIND) end,
mg=mg,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
else else
c:ResetFlagEffect(62899696) c:ResetFlagEffect(id)
end end
end end
end end
--水晶機巧-リオン --水晶機巧-リオン
function c66938505.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66938505,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,66938505) e1:SetCountLimit(1,id)
e1:SetCondition(c66938505.sccon) e1:SetCondition(s.sccon)
e1:SetTarget(c66938505.sctg) e1:SetTarget(s.sctg)
e1:SetOperation(c66938505.scop) e1:SetOperation(s.scop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c66938505.sccon(e,tp,eg,ep,ev,re,r,rp) function s.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
end end
function c66938505.scfilter1(c,e,tp,mc) function s.scfilter1(c,e,tp,mc)
local mg=Group.FromCards(c,mc) local mg=Group.FromCards(c,mc)
return not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c66938505.scfilter2,tp,LOCATION_EXTRA,0,1,nil,mg) and Duel.IsExistingMatchingCard(s.scfilter2,tp,LOCATION_EXTRA,0,1,nil,mg)
end end
function c66938505.scfilter2(c,mg) function s.scfilter2(c,mg)
return c:IsRace(RACE_MACHINE) and c:IsSynchroSummonable(nil,mg) return c:IsRace(RACE_MACHINE) and c:IsSynchroSummonable(nil,mg)
end end
function c66938505.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c66938505.scfilter1(chkc,e,tp,e:GetHandler()) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.scfilter1(chkc,e,tp,e:GetHandler()) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c66938505.scfilter1,tp,LOCATION_REMOVED,0,1,nil,e,tp,e:GetHandler()) end and Duel.IsExistingTarget(s.scfilter1,tp,LOCATION_REMOVED,0,1,nil,e,tp,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c66938505.scfilter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,e:GetHandler()) local g=Duel.SelectTarget(tp,s.scfilter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c66938505.scop(e,tp,eg,ep,ev,re,r,rp) function s.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
...@@ -56,19 +57,29 @@ function c66938505.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,19 +57,29 @@ function c66938505.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.AdjustAll() Duel.AdjustAll()
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(c66938505.scfilter2,tp,LOCATION_EXTRA,0,nil,mg) local g=Duel.GetMatchingGroup(s.scfilter2,tp,LOCATION_EXTRA,0,nil,mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local opt=Duel.SelectOption(tp,1164,1379)
local sg=g:Select(tp,1,1,nil) if opt==0 then
local e1=Effect.CreateEffect(c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) local sg=g:Select(tp,1,1,nil)
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetValue(LOCATION_DECKSHF) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
c:RegisterEffect(e1,true) e1:SetValue(LOCATION_DECKSHF)
local e2=e1:Clone() e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e2,true) c:RegisterEffect(e1,true)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) local e2=e1:Clone()
tc:RegisterEffect(e2,true)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
else
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
synfilter=function(stc) return stc:IsRace(RACE_MACHINE) end,
mg=mg,
material_operation=AccelSynchro.SYNCHRO_OPERATION_SHUFFLE,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end end
end end
...@@ -70,9 +70,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,9 +70,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup() if g:GetCount()>0 and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup()
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local opt=Duel.SelectOption(tp,1164,1379)
local sg=g:Select(tp,1,1,nil) if opt==0 then
Duel.SynchroSummon(tp,sg:GetFirst(),c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
else
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
synfilter=function(stc) return stc:IsRace(RACE_DRAGON) end,
gc=function() return c end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end end
end end
if not comp then Duel.SpecialSummonComplete() end if not comp then Duel.SpecialSummonComplete() end
......
--ダイガスタ・ラプラムピリカ --ダイガスタ・ラプラムピリカ
function c76937326.initial_effect(c) local s,id,o=GetID()
c:SetSPSummonOnce(76937326) function s.initial_effect(c)
c:SetSPSummonOnce(id)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x10),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x10),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76937326,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c76937326.spcon) e1:SetCondition(s.spcon)
e1:SetTarget(c76937326.sptg) e1:SetTarget(s.sptg)
e1:SetOperation(c76937326.spop) e1:SetOperation(s.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot be target --cannot be target
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -22,44 +23,44 @@ function c76937326.initial_effect(c) ...@@ -22,44 +23,44 @@ function c76937326.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c76937326.imval) e2:SetTarget(s.imval)
e2:SetValue(aux.tgoval) e2:SetValue(aux.tgoval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c76937326.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c76937326.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c76937326.fselect(g,tp) function s.fselect(g,tp)
return g:GetClassCount(Card.GetLocation)==#g and Duel.IsExistingMatchingCard(c76937326.synfilter,tp,LOCATION_EXTRA,0,1,nil,g) return g:GetClassCount(Card.GetLocation)==#g and Duel.IsExistingMatchingCard(s.synfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end end
function c76937326.synfilter(c,g) function s.synfilter(c,g)
return c:IsSetCard(0x10) and c:IsSynchroSummonable(nil,g) return c:IsSetCard(0x10) and c:IsSynchroSummonable(nil,g)
end end
function c76937326.chkfilter(c,tp) function s.chkfilter(c,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x10) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x10) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c76937326.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return false end if not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return false end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return false end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return false end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return false end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return false end
local cg=Duel.GetMatchingGroup(c76937326.chkfilter,tp,LOCATION_EXTRA,0,nil,tp) local cg=Duel.GetMatchingGroup(s.chkfilter,tp,LOCATION_EXTRA,0,nil,tp)
if #cg==0 then return false end if #cg==0 then return false end
local g=Duel.GetMatchingGroup(c76937326.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
return g:CheckSubGroup(c76937326.fselect,2,2,tp) return g:CheckSubGroup(s.fselect,2,2,tp)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK)
end end
function c76937326.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanSpecialSummonCount(tp,2) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then if Duel.IsPlayerCanSpecialSummonCount(tp,2) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then
local cg=Duel.GetMatchingGroup(c76937326.chkfilter,tp,LOCATION_EXTRA,0,nil,tp) local cg=Duel.GetMatchingGroup(s.chkfilter,tp,LOCATION_EXTRA,0,nil,tp)
if #cg>0 then if #cg>0 then
local g=Duel.GetMatchingGroup(c76937326.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c76937326.fselect,false,2,2,tp) local sg=g:SelectSubGroup(tp,s.fselect,false,2,2,tp)
if sg then if sg then
local tc=sg:GetFirst() local tc=sg:GetFirst()
while tc do while tc do
...@@ -79,11 +80,21 @@ function c76937326.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,11 +80,21 @@ function c76937326.spop(e,tp,eg,ep,ev,re,r,rp)
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
Duel.AdjustAll() Duel.AdjustAll()
if og:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end if og:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local tg=Duel.GetMatchingGroup(c76937326.synfilter,tp,LOCATION_EXTRA,0,nil,og) local tg=Duel.GetMatchingGroup(s.synfilter,tp,LOCATION_EXTRA,0,nil,og)
if og:GetCount()==sg:GetCount() and tg:GetCount()>0 then if og:GetCount()==sg:GetCount() and tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local opt=Duel.SelectOption(tp,1164,1379)
local rg=tg:Select(tp,1,1,nil) if opt==0 then
Duel.SynchroSummon(tp,rg:GetFirst(),nil,og) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=tg:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,rg:GetFirst(),nil,og)
else
local c=e:GetHandler()
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
synfilter=function(stc) return stc:IsSetCard(0x10) end,
mg=og,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end end
end end
end end
...@@ -93,13 +104,13 @@ function c76937326.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,13 +104,13 @@ function c76937326.spop(e,tp,eg,ep,ev,re,r,rp)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTargetRange(1,0) e3:SetTargetRange(1,0)
e3:SetTarget(c76937326.splimit) e3:SetTarget(s.splimit)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
function c76937326.splimit(e,c) function s.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WIND) return not c:IsAttribute(ATTRIBUTE_WIND)
end end
function c76937326.imval(e,c) function s.imval(e,c)
return c~=e:GetHandler() and c:IsSetCard(0x10) and c:IsType(TYPE_SYNCHRO) return c~=e:GetHandler() and c:IsSetCard(0x10) and c:IsType(TYPE_SYNCHRO)
end end
--竜星の極み --竜星の極み
function c77783947.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
...@@ -19,53 +20,64 @@ function c77783947.initial_effect(c) ...@@ -19,53 +20,64 @@ function c77783947.initial_effect(c)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) e4:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c77783947.sccon) e4:SetCondition(s.sccon)
e4:SetCost(c77783947.sccost) e4:SetCost(s.sccost)
e4:SetTarget(c77783947.sctg) e4:SetTarget(s.sctg)
e4:SetOperation(c77783947.scop) e4:SetOperation(s.scop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c77783947.sccon(e,tp,eg,ep,ev,re,r,rp) function s.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2
end end
function c77783947.mfilter(c) function s.mfilter(c)
return c:IsSetCard(0x9e) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x9e) and c:IsType(TYPE_MONSTER)
end end
function c77783947.syncheck(g,tp,syncard) function s.syncheck(g,tp,syncard)
return g:IsExists(c77783947.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard) return g:IsExists(s.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
end end
function c77783947.spfilter(c,tp,mg) function s.spfilter(c,tp,mg)
return mg:CheckSubGroup(c77783947.syncheck,2,#mg,tp,c) return mg:CheckSubGroup(s.syncheck,2,#mg,tp,c)
end end
function c77783947.sccost(e,tp,eg,ep,ev,re,r,rp,chk) function s.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c77783947.sctg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetSynchroMaterial(tp) local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil) local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end if mg2:GetCount()>0 then mg:Merge(mg2) end
end end
return Duel.IsExistingMatchingCard(c77783947.spfilter,tp,LOCATION_EXTRA,0,1,nil,tp,mg) return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c77783947.scop(e,tp,eg,ep,ev,re,r,rp) function s.scop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetSynchroMaterial(tp) local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil) local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end if mg2:GetCount()>0 then mg:Merge(mg2) end
end end
local g=Duel.GetMatchingGroup(c77783947.spfilter,tp,LOCATION_EXTRA,0,nil,tp,mg) local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,tp,mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local opt=Duel.SelectOption(tp,1164,1379)
local sg=g:Select(tp,1,1,nil) if opt==0 then
local sc=sg:GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) local sg=g:Select(tp,1,1,nil)
local tg=mg:SelectSubGroup(tp,c77783947.syncheck,false,2,#mg,tp,sc) local sc=sg:GetFirst()
Duel.SynchroSummon(tp,sc,nil,tg,#tg-1,#tg-1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tg=mg:SelectSubGroup(tp,s.syncheck,false,2,#mg,tp,sc)
Duel.SynchroSummon(tp,sc,nil,tg,#tg-1,#tg-1)
else
local c=e:GetHandler()
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
additional_scheck=function(sg)
return sg:IsExists(function(mc) return mc:IsSetCard(0x9e) end,1,nil)
end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end end
end end
--EMオッドアイズ・シンクロン --EMオッドアイズ・シンクロン
function c82224646.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--tuner --tuner
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(82224646,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetTarget(c82224646.tntg) e1:SetTarget(s.tntg)
e1:SetOperation(c82224646.tnop) e1:SetOperation(s.tnop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Banish --Banish
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -17,40 +18,40 @@ function c82224646.initial_effect(c) ...@@ -17,40 +18,40 @@ function c82224646.initial_effect(c)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(LOCATION_REMOVED) e2:SetValue(LOCATION_REMOVED)
e2:SetCondition(c82224646.rmcon) e2:SetCondition(s.rmcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(82224646,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c82224646.sptg) e3:SetTarget(s.sptg)
e3:SetOperation(c82224646.spop) e3:SetOperation(s.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--synchro --synchro
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(82224646,2)) e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetTarget(c82224646.sctg) e4:SetTarget(s.sctg)
e4:SetOperation(c82224646.scop) e4:SetOperation(s.scop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c82224646.tnfilter(c) function s.tnfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9f,0x99) and c:IsLevelAbove(0) and (not c:IsType(TYPE_TUNER) or c:IsLevelAbove(2)) return c:IsFaceup() and c:IsSetCard(0x9f,0x99) and c:IsLevelAbove(0) and (not c:IsType(TYPE_TUNER) or c:IsLevelAbove(2))
end end
function c82224646.tntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.tntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c82224646.tnfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tnfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c82224646.tnfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.tnfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c82224646.tnfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,s.tnfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c82224646.tnop(e,tp,eg,ep,ev,re,r,rp) function s.tnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
...@@ -68,22 +69,22 @@ function c82224646.tnop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,22 +69,22 @@ function c82224646.tnop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
function c82224646.rmcon(e) function s.rmcon(e)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_SYNCHRO) return c:IsSummonLocation(LOCATION_EXTRA) and c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_SYNCHRO)
end end
function c82224646.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsLevelBelow(3) and c:IsSetCard(0x9f,0x99) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(3) and c:IsSetCard(0x9f,0x99) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c82224646.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c82224646.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c82224646.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c82224646.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c82224646.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
...@@ -101,25 +102,25 @@ function c82224646.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,25 +102,25 @@ function c82224646.spop(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
function c82224646.scfilter1(c,e,tp,mc) function s.scfilter1(c,e,tp,mc)
local mg=Group.FromCards(c,mc) local mg=Group.FromCards(c,mc)
return c:IsCanBeSynchroMaterial() and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_SYNCHRO_MATERIAL,tp,false,false) return c:IsCanBeSynchroMaterial() and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_SYNCHRO_MATERIAL,tp,false,false)
and Duel.IsExistingMatchingCard(c82224646.scfilter2,tp,LOCATION_EXTRA,0,1,nil,tp,mg) and Duel.IsExistingMatchingCard(s.scfilter2,tp,LOCATION_EXTRA,0,1,nil,tp,mg)
end end
function c82224646.scfilter2(c,tp,mg) function s.scfilter2(c,tp,mg)
return c:IsSynchroSummonable(nil,mg) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0 return c:IsSynchroSummonable(nil,mg) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end end
function c82224646.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and c82224646.scfilter1(chkc,e,tp,c) end if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.scfilter1(chkc,e,tp,c) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c82224646.scfilter1,tp,LOCATION_PZONE,0,1,nil,e,tp,c) end and Duel.IsExistingTarget(s.scfilter1,tp,LOCATION_PZONE,0,1,nil,e,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c82224646.scfilter1,tp,LOCATION_PZONE,0,1,1,nil,e,tp,c) local g=Duel.SelectTarget(tp,s.scfilter1,tp,LOCATION_PZONE,0,1,1,nil,e,tp,c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c82224646.scop(e,tp,eg,ep,ev,re,r,rp) function s.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,SUMMON_VALUE_SYNCHRO_MATERIAL,tp,tp,false,false,POS_FACEUP) then if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,SUMMON_VALUE_SYNCHRO_MATERIAL,tp,tp,false,false,POS_FACEUP) then
...@@ -138,10 +139,18 @@ function c82224646.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -138,10 +139,18 @@ function c82224646.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.AdjustAll() Duel.AdjustAll()
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(c82224646.scfilter2,tp,LOCATION_EXTRA,0,nil,tp,mg) local g=Duel.GetMatchingGroup(s.scfilter2,tp,LOCATION_EXTRA,0,nil,tp,mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local opt=Duel.SelectOption(tp,1164,1379)
local sg=g:Select(tp,1,1,nil) if opt==0 then
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
else
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
mg=mg,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end end
end end
--リサイコロ --リサイコロ
function c85704698.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--Special Summon --Special Summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DICE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DICE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c85704698.sptg) e1:SetTarget(s.sptg)
e1:SetOperation(c85704698.spop) e1:SetOperation(s.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Synchro Summon --Synchro Summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -17,23 +18,23 @@ function c85704698.initial_effect(c) ...@@ -17,23 +18,23 @@ function c85704698.initial_effect(c)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c85704698.syntg) e2:SetTarget(s.syntg)
e2:SetOperation(c85704698.synop) e2:SetOperation(s.synop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c85704698.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c85704698.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c85704698.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c85704698.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c85704698.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end end
function c85704698.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
...@@ -58,39 +59,50 @@ function c85704698.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,39 +59,50 @@ function c85704698.spop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
end end
function c85704698.mfilter(c) function s.mfilter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER)
end end
function c85704698.syncheck(g,tp,syncard) function s.syncheck(g,tp,syncard)
return g:IsExists(c85704698.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard) return g:IsExists(s.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
end end
function c85704698.spfilter(c,tp,mg) function s.spfilter(c,tp,mg)
return c:IsAttribute(ATTRIBUTE_WIND) and mg:CheckSubGroup(c85704698.syncheck,2,#mg,tp,c) return c:IsAttribute(ATTRIBUTE_WIND) and mg:CheckSubGroup(s.syncheck,2,#mg,tp,c)
end end
function c85704698.syntg(e,tp,eg,ep,ev,re,r,rp,chk) function s.syntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetSynchroMaterial(tp) local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil) local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end if mg2:GetCount()>0 then mg:Merge(mg2) end
end end
return Duel.IsExistingMatchingCard(c85704698.spfilter,tp,LOCATION_EXTRA,0,1,nil,tp,mg) return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c85704698.synop(e,tp,eg,ep,ev,re,r,rp) function s.synop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetSynchroMaterial(tp) local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil) local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end if mg2:GetCount()>0 then mg:Merge(mg2) end
end end
local g=Duel.GetMatchingGroup(c85704698.spfilter,tp,LOCATION_EXTRA,0,nil,tp,mg) local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,tp,mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local opt=Duel.SelectOption(tp,1164,1379)
local sg=g:Select(tp,1,1,nil) if opt==0 then
local sc=sg:GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) local sg=g:Select(tp,1,1,nil)
local tg=mg:SelectSubGroup(tp,c85704698.syncheck,false,2,#mg,tp,sc) local sc=sg:GetFirst()
Duel.SynchroSummon(tp,sc,nil,tg,#tg-1,#tg-1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tg=mg:SelectSubGroup(tp,s.syncheck,false,2,#mg,tp,sc)
Duel.SynchroSummon(tp,sc,nil,tg,#tg-1,#tg-1)
else
local c=e:GetHandler()
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
additional_scheck=function(sg)
return sg:IsExists(function(mc) return mc:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) end,1,nil)
end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end end
end end
--斬機超階乗 --斬機超階乗
function c87804365.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,87804365+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c87804365.target) e1:SetTarget(s.target)
e1:SetOperation(c87804365.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c87804365.spfilter1(c,e,tp) function s.spfilter1(c,e,tp)
return c:IsSetCard(0x132) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) return c:IsSetCard(0x132) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e)
end end
function c87804365.fselect1(g,tp) function s.fselect1(g,tp)
return Duel.IsExistingMatchingCard(c87804365.synfilter,tp,LOCATION_EXTRA,0,1,nil,g) and aux.dncheck(g) return Duel.IsExistingMatchingCard(s.synfilter,tp,LOCATION_EXTRA,0,1,nil,g) and aux.dncheck(g)
end end
function c87804365.synfilter(c,g) function s.synfilter(c,g)
return c:IsSetCard(0x132) and c:IsSynchroSummonable(nil,g,g:GetCount()-1,g:GetCount()-1) return c:IsSetCard(0x132) and c:IsSynchroSummonable(nil,g,g:GetCount()-1,g:GetCount()-1)
end end
function c87804365.fselect2(g,tp) function s.fselect2(g,tp)
return Duel.IsExistingMatchingCard(c87804365.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,g) and aux.dncheck(g) return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,g) and aux.dncheck(g)
end end
function c87804365.xyzfilter(c,g) function s.xyzfilter(c,g)
return c:IsSetCard(0x132) and c:IsXyzSummonable(g,g:GetCount(),g:GetCount()) return c:IsSetCard(0x132) and c:IsXyzSummonable(g,g:GetCount(),g:GetCount())
end end
function c87804365.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),3) local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),3)
local g=Duel.GetMatchingGroup(c87804365.spfilter1,tp,LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_GRAVE,0,nil,e,tp)
local b1=g:CheckSubGroup(c87804365.fselect1,1,ft,tp) local b1=g:CheckSubGroup(s.fselect1,1,ft,tp)
local b2=g:CheckSubGroup(c87804365.fselect2,1,ft,tp) local b2=g:CheckSubGroup(s.fselect2,1,ft,tp)
if chk==0 then return ft>0 and Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return ft>0 and Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and (b1 or b2) end and not Duel.IsPlayerAffectedByEffect(tp,59822133) and (b1 or b2) end
local op=0 local op=0
if b1 and b2 then if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(87804365,0),aux.Stringid(87804365,1)) op=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1))
elseif b1 then elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(87804365,0)) op=Duel.SelectOption(tp,aux.Stringid(id,0))
else else
op=Duel.SelectOption(tp,aux.Stringid(87804365,1))+1 op=Duel.SelectOption(tp,aux.Stringid(id,1))+1
end end
e:SetLabel(op) e:SetLabel(op)
local sg=nil local sg=nil
if op==0 then if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=g:SelectSubGroup(tp,c87804365.fselect1,false,1,ft,tp) sg=g:SelectSubGroup(tp,s.fselect1,false,1,ft,tp)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=g:SelectSubGroup(tp,c87804365.fselect2,false,1,ft,tp) sg=g:SelectSubGroup(tp,s.fselect2,false,1,ft,tp)
end end
Duel.SetTargetCard(sg) Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,sg:GetCount(),0,0)
end end
function c87804365.spfilter2(c,e,tp) function s.spfilter2(c,e,tp)
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c87804365.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel() local op=e:GetLabel()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c87804365.spfilter2,nil,e,tp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(s.spfilter2,nil,e,tp)
if #g==0 then return end if #g==0 then return end
if #g>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if #g>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if #g>ft then if #g>ft then
...@@ -87,25 +88,36 @@ function c87804365.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,25 +88,36 @@ function c87804365.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.AdjustAll() Duel.AdjustAll()
if og:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<g:GetCount() then return end if og:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<g:GetCount() then return end
if op==0 then if op==0 then
local tg=Duel.GetMatchingGroup(c87804365.synfilter,tp,LOCATION_EXTRA,0,nil,og) local tg=Duel.GetMatchingGroup(s.synfilter,tp,LOCATION_EXTRA,0,nil,og)
if og:GetCount()==g:GetCount() and tg:GetCount()>0 then if og:GetCount()==g:GetCount() and tg:GetCount()>0 then
local tc=og:GetFirst() local opt=Duel.SelectOption(tp,1164,1379)
while tc do if opt==0 then
local e3=Effect.CreateEffect(e:GetHandler()) local tc=og:GetFirst()
e3:SetType(EFFECT_TYPE_SINGLE) while tc do
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetValue(LOCATION_DECKBOT) e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
tc:RegisterEffect(e3) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc=og:GetNext() e3:SetValue(LOCATION_DECKBOT)
tc:RegisterEffect(e3)
tc=og:GetNext()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=tg:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,rg:GetFirst(),nil,og,og:GetCount()-1,og:GetCount()-1)
else
local c=e:GetHandler()
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
synfilter=function(stc) return stc:IsSetCard(0x132) and stc:IsSynchroSummonable(nil,g,g:GetCount()-1,g:GetCount()-1) end,
mg=og,
material_operation=AccelSynchro.SYNCHRO_OPERATION_SHUFFLE,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=tg:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,rg:GetFirst(),nil,og,og:GetCount()-1,og:GetCount()-1)
end end
else else
local tg=Duel.GetMatchingGroup(c87804365.xyzfilter,tp,LOCATION_EXTRA,0,nil,og) local tg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,og)
if og:GetCount()==g:GetCount() and tg:GetCount()>0 then if og:GetCount()==g:GetCount() and tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=tg:Select(tp,1,1,nil) local rg=tg:Select(tp,1,1,nil)
......
--SRオハジキッド --SRオハジキッド
function c89326990.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(89326990,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c89326990.target) e1:SetTarget(s.target)
e1:SetOperation(c89326990.operation) e1:SetOperation(s.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c89326990.filter(c,e,tp,mc) function s.filter(c,e,tp,mc)
local mg=Group.FromCards(c,mc) local mg=Group.FromCards(c,mc)
return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c89326990.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg) and Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
end end
function c89326990.scfilter(c,mg) function s.scfilter(c,mg)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroSummonable(nil,mg) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroSummonable(nil,mg)
end end
function c89326990.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c89326990.filter(chkc,e,tp,e:GetHandler()) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp,e:GetHandler()) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c89326990.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,e:GetHandler()) end and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c89326990.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp,e:GetHandler()) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c89326990.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end if not tc:IsRelateToEffect(e) or Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
local g=Duel.GetMatchingGroup(c89326990.scfilter,tp,LOCATION_EXTRA,0,nil,mg) local g=Duel.GetMatchingGroup(s.scfilter,tp,LOCATION_EXTRA,0,nil,mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local opt=Duel.SelectOption(tp,1164,1379)
local sg=g:Select(tp,1,1,nil) if opt==0 then
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
else
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
synfilter=function(stc) return stc:IsAttribute(ATTRIBUTE_WIND) end,
mg=mg,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end end
end end
--疾風のドラグニティ --疾風のドラグニティ
function c89450409.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(89450409,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,89450409+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c89450409.condition) e1:SetCondition(s.condition)
e1:SetTarget(c89450409.target) e1:SetTarget(s.target)
e1:SetOperation(c89450409.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c89450409.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end end
function c89450409.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsSetCard(0x29) and (c:IsType(TYPE_TUNER) or c:IsRace(RACE_WINDBEAST)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x29) and (c:IsType(TYPE_TUNER) or c:IsRace(RACE_WINDBEAST)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c89450409.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local g=Duel.GetMatchingGroup(c89450409.filter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and g:CheckSubGroup(aux.gffcheck,2,2,Card.IsType,TYPE_TUNER,Card.IsRace,RACE_WINDBEAST) and g:CheckSubGroup(aux.gffcheck,2,2,Card.IsType,TYPE_TUNER,Card.IsRace,RACE_WINDBEAST)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end end
function c89450409.cfilter(c) function s.cfilter(c)
return c:IsSummonLocation(LOCATION_EXTRA) return c:IsSummonLocation(LOCATION_EXTRA)
end end
function c89450409.scfilter(c,mg) function s.scfilter(c,mg)
return c:IsRace(RACE_DRAGON) and c:IsSynchroSummonable(nil,mg) return c:IsRace(RACE_DRAGON) and c:IsSynchroSummonable(nil,mg)
end end
function c89450409.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -42,12 +43,12 @@ function c89450409.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,12 +43,12 @@ function c89450409.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTargetRange(1,0) e3:SetTargetRange(1,0)
e3:SetTarget(c89450409.splimit) e3:SetTarget(s.splimit)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetMatchingGroup(c89450409.filter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.gffcheck,false,2,2,Card.IsType,TYPE_TUNER,Card.IsRace,RACE_WINDBEAST) local sg=g:SelectSubGroup(tp,aux.gffcheck,false,2,2,Card.IsType,TYPE_TUNER,Card.IsRace,RACE_WINDBEAST)
if not sg then return end if not sg then return end
...@@ -74,14 +75,23 @@ function c89450409.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,14 +75,23 @@ function c89450409.activate(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
local mg=Duel.GetSynchroMaterial(tp):Filter(Card.IsSetCard,nil,0x29) local mg=Duel.GetSynchroMaterial(tp):Filter(Card.IsSetCard,nil,0x29)
if success and Duel.IsExistingMatchingCard(c89450409.cfilter,tp,0,LOCATION_MZONE,1,nil) if success and Duel.IsExistingMatchingCard(s.cfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(c89450409.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg) and Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
and Duel.SelectYesNo(tp,aux.Stringid(89450409,1)) then and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local opt=Duel.SelectOption(tp,1164,1379)
local tc=Duel.SelectMatchingCard(tp,c89450409.scfilter,tp,LOCATION_EXTRA,0,1,1,nil,mg):GetFirst() if opt==0 then
Duel.SynchroSummon(tp,tc,nil,mg) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.scfilter,tp,LOCATION_EXTRA,0,1,1,nil,mg):GetFirst()
Duel.SynchroSummon(tp,tc,nil,mg)
else
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
synfilter=function(stc) return stc:IsRace(RACE_DRAGON) end,
mg=mg,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end end
end end
function c89450409.splimit(e,c) function s.splimit(e,c)
return not c:IsRace(RACE_DRAGON) and c:IsLocation(LOCATION_EXTRA) return not c:IsRace(RACE_DRAGON) and c:IsLocation(LOCATION_EXTRA)
end end
--シンクロコール --シンクロコール
function c89974904.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c89974904.target) e1:SetTarget(s.target)
e1:SetOperation(c89974904.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c89974904.cfilter(c,tc) function s.cfilter(c,tc)
return c:IsRace(RACE_DRAGON+RACE_FIEND) and c:IsAttribute(ATTRIBUTE_DARK) return c:IsRace(RACE_DRAGON+RACE_FIEND) and c:IsAttribute(ATTRIBUTE_DARK)
and c:IsSynchroSummonable(tc) and c:IsSynchroSummonable(tc)
end end
function c89974904.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_SYNCHRO_MATERIAL,tp,false,false) return c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_SYNCHRO_MATERIAL,tp,false,false)
and Duel.IsExistingMatchingCard(c89974904.cfilter,tp,LOCATION_EXTRA,0,1,nil,c) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil,c)
end end
function c89974904.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c89974904.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c89974904.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c89974904.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,LOCATION_EXTRA)
end end
function c89974904.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,SUMMON_VALUE_SYNCHRO_MATERIAL,tp,tp,false,false,POS_FACEUP) then if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,SUMMON_VALUE_SYNCHRO_MATERIAL,tp,tp,false,false,POS_FACEUP) then
...@@ -43,11 +44,22 @@ function c89974904.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,11 +44,22 @@ function c89974904.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
Duel.AdjustAll() Duel.AdjustAll()
if not tc:IsLocation(LOCATION_MZONE) then return end if not tc:IsLocation(LOCATION_MZONE) then return end
local g=Duel.GetMatchingGroup(c89974904.cfilter,tp,LOCATION_EXTRA,0,nil,tc) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_EXTRA,0,nil,tc)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local opt=Duel.SelectOption(tp,1164,1379)
local sg=g:Select(tp,1,1,nil) if opt==0 then
Duel.SynchroSummon(tp,sg:GetFirst(),tc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),tc)
else
local mg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
synfilter=function(stc) return stc:IsRace(RACE_DRAGON|RACE_FIEND) and stc:IsAttribute(ATTRIBUTE_DARK) end,
gc=function() return tc end,
mg=mg,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end end
end end
end end
--水晶機巧-クオン --水晶機巧-クオン
function c93665266.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(93665266,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,93665266) e1:SetCountLimit(1,id)
e1:SetCondition(c93665266.sccon) e1:SetCondition(s.sccon)
e1:SetTarget(c93665266.sctg) e1:SetTarget(s.sctg)
e1:SetOperation(c93665266.scop) e1:SetOperation(s.scop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c93665266.sccon(e,tp,eg,ep,ev,re,r,rp) function s.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
end end
function c93665266.scfilter1(c,e,tp,mc) function s.scfilter1(c,e,tp,mc)
local mg=Group.FromCards(c,mc) local mg=Group.FromCards(c,mc)
return not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c93665266.scfilter2,tp,LOCATION_EXTRA,0,1,nil,mg) and Duel.IsExistingMatchingCard(s.scfilter2,tp,LOCATION_EXTRA,0,1,nil,mg)
end end
function c93665266.scfilter2(c,mg) function s.scfilter2(c,mg)
return c:IsRace(RACE_MACHINE) and c:IsSynchroSummonable(nil,mg) return c:IsRace(RACE_MACHINE) and c:IsSynchroSummonable(nil,mg)
end end
function c93665266.sctg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c93665266.scfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,e:GetHandler()) end and Duel.IsExistingMatchingCard(s.scfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c93665266.scop(e,tp,eg,ep,ev,re,r,rp) function s.scop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c93665266.scfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,c) local g=Duel.SelectMatchingCard(tp,s.scfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,c)
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc or not Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then return end if not tc or not Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -53,10 +54,19 @@ function c93665266.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,10 +54,19 @@ function c93665266.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.AdjustAll() Duel.AdjustAll()
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(c93665266.scfilter2,tp,LOCATION_EXTRA,0,nil,mg) local g=Duel.GetMatchingGroup(s.scfilter2,tp,LOCATION_EXTRA,0,nil,mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local opt=Duel.SelectOption(tp,1164,1379)
local sg=g:Select(tp,1,1,nil) if opt==0 then
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
else
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
synfilter=function(stc) return stc:IsRace(RACE_MACHINE) end,
mg=mg,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end end
end end
...@@ -3903,48 +3903,56 @@ function Synchro.SynOperation() ...@@ -3903,48 +3903,56 @@ function Synchro.SynOperation()
Duel.ConfirmCards(1-tp,confirm_cards) Duel.ConfirmCards(1-tp,confirm_cards)
Duel.HintSelection(g-confirm_cards) Duel.HintSelection(g-confirm_cards)
for mc in aux.Next(g) do if AccelSynchro.OverwriteMaterialOperationCode==nil then
if Synchro.IsRevolution(mc,c) then for mc in aux.Next(g) do
local revo_effect=mc:IsHasEffect(97682931) if Synchro.IsRevolution(mc,c) then
Duel.Hint(HINT_CARD,0,mc:GetCode()) local revo_effect=mc:IsHasEffect(97682931)
revo_effect:UseCountLimit(mc:GetControler()) Duel.Hint(HINT_CARD,0,mc:GetCode())
revo_effect:UseCountLimit(mc:GetControler())
end
end end
end -- Detect whether Tatsunecro’s effect was actually used:
-- Detect whether Tatsunecro’s effect was actually used: -- (a) Tatsunecro itself was used as material, AND
-- (a) Tatsunecro itself was used as material, AND -- (b) At least one hand card was included.
-- (b) At least one hand card was included. local used_tatsunecro_effect=g:IsExists(function(card) return Synchro.IsTatsunecro(card) end,1,nil)
local used_tatsunecro_effect=g:IsExists(function(card) return Synchro.IsTatsunecro(card) end,1,nil) and g:IsExists(function(card) return card:IsLocation(LOCATION_HAND) end,1,nil)
and g:IsExists(function(card) return card:IsLocation(LOCATION_HAND) end,1,nil)
-- Detect which effect-bearing monster(s) were used as material:
-- Detect which effect-bearing monster(s) were used as material: -- Tatsunecro ⇒ banish clause; Tatsunoko ⇒ normal GY clause
-- Tatsunecro ⇒ banish clause; Tatsunoko ⇒ normal GY clause local has_tatsunecro=g:IsExists(function(card) return Synchro.IsTatsunecro(card) end,1,nil)
local has_tatsunecro=g:IsExists(function(card) return Synchro.IsTatsunecro(card) end,1,nil) local has_tatsunoko=g:IsExists(function(card) return Synchro.IsTatsunoko(card) end,1,nil)
local has_tatsunoko=g:IsExists(function(card) return Synchro.IsTatsunoko(card) end,1,nil)
if used_tatsunecro_effect then
if used_tatsunecro_effect then if has_tatsunecro and not has_tatsunoko then
if has_tatsunecro and not has_tatsunoko then -- Only Tatsunecro applies: banish all materials
-- Only Tatsunecro applies: banish all materials Duel.Remove(g, POS_FACEUP, REASON_MATERIAL+REASON_SYNCHRO)
Duel.Remove(g, POS_FACEUP, REASON_MATERIAL+REASON_SYNCHRO) elseif has_tatsunoko and not has_tatsunecro then
elseif has_tatsunoko and not has_tatsunecro then -- Only Tatsunoko applies: send all materials to the GY
-- Only Tatsunoko applies: send all materials to the GY Duel.SendtoGrave(g, REASON_MATERIAL+REASON_SYNCHRO)
Duel.SendtoGrave(g, REASON_MATERIAL+REASON_SYNCHRO) else
else -- Both apply: prompt the player to choose
-- Both apply: prompt the player to choose local opts={
local opts={ 1005, -- banish
1005, -- banish 1004, -- grave
1004, -- grave }
} local choice=Duel.SelectOption(tp,table.unpack(opts))
local choice=Duel.SelectOption(tp,table.unpack(opts)) if choice==0 then
if choice==0 then Duel.Hint(HINT_CARD,0,3096468)
Duel.Hint(HINT_CARD,0,3096468) Duel.Remove(g,POS_FACEUP,REASON_MATERIAL+REASON_SYNCHRO)
Duel.Remove(g,POS_FACEUP,REASON_MATERIAL+REASON_SYNCHRO) else
else Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO) end
end end
end else
else -- Tatsunecro’s banish clause not used: always send to the GY
-- Tatsunecro’s banish clause not used: always send to the GY Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO) end
else
--- apply accelsynchro overwrite operation
local operation=AccelSynchro.GetOperationByCode(AccelSynchro.OverwriteMaterialOperationCode)
operation(g,tp)
--- reset overwrite
AccelSynchro.OverwriteMaterialOperationCode=nil
end end
g:DeleteGroup() g:DeleteGroup()
end end
...@@ -4446,11 +4454,15 @@ end ...@@ -4446,11 +4454,15 @@ end
AccelSynchro={} AccelSynchro={}
AccelSynchro.OverwriteMaterialOperationCode=nil
function AccelSynchro.CreateSummonEffect(c,opts) function AccelSynchro.CreateSummonEffect(c,opts)
local mg=opts.mg or nil local mg=opts.mg or nil
local gc=opts.gc or function() return nil end local gc=opts.gc or function() return nil end
local synfilter=opts.synfilter or aux.TRUE
local skip_hand_count_check=opts.skip_hand_count_check or false local skip_hand_count_check=opts.skip_hand_count_check or false
local additional_scheck=opts.additional_scheck local additional_scheck=opts.additional_scheck
local material_operation=opts.material_operation
local e=Effect.CreateEffect(c) local e=Effect.CreateEffect(c)
-- e:SetDescription(1164) -- e:SetDescription(1164)
e:SetDescription(1379) --- 启用扩展卡包调试模式 e:SetDescription(1379) --- 启用扩展卡包调试模式
...@@ -4458,12 +4470,12 @@ function AccelSynchro.CreateSummonEffect(c,opts) ...@@ -4458,12 +4470,12 @@ function AccelSynchro.CreateSummonEffect(c,opts)
e:SetType(EFFECT_TYPE_QUICK_O) e:SetType(EFFECT_TYPE_QUICK_O)
e:SetCode(EVENT_FREE_CHAIN) e:SetCode(EVENT_FREE_CHAIN)
e:SetRange(LOCATION_MZONE) e:SetRange(LOCATION_MZONE)
e:SetTarget(AccelSynchro.GetSummonTarget(mg,gc,skip_hand_count_check,additional_scheck)) e:SetTarget(AccelSynchro.GetSummonTarget(synfilter,mg,gc,skip_hand_count_check,additional_scheck))
e:SetOperation(AccelSynchro.GetSummonOperation(mg,gc,skip_hand_count_check,additional_scheck)) e:SetOperation(AccelSynchro.GetSummonOperation(synfilter,mg,gc,skip_hand_count_check,additional_scheck,material_operation))
return e return e
end end
function AccelSynchro.GetSummonTarget(mg,gc,skip_hand_count_check,additional_scheck) function AccelSynchro.GetSummonTarget(synfilter,mg,gc,skip_hand_count_check,additional_scheck)
return function(e,tp,eg,ep,ev,re,r,rp,chk) return function(e,tp,eg,ep,ev,re,r,rp,chk)
mg=mg or Duel.GetSynchroMaterial(tp) mg=mg or Duel.GetSynchroMaterial(tp)
if chk==0 then if chk==0 then
...@@ -4474,10 +4486,11 @@ function AccelSynchro.GetSummonTarget(mg,gc,skip_hand_count_check,additional_sch ...@@ -4474,10 +4486,11 @@ function AccelSynchro.GetSummonTarget(mg,gc,skip_hand_count_check,additional_sch
end end
end end
function AccelSynchro.GetSummonOperation(mg,gc,skip_hand_count_check,additional_scheck) function AccelSynchro.GetSummonOperation(synfilter,mg,gc,skip_hand_count_check,additional_scheck,material_operation)
return function(e,tp,eg,ep,ev,re,r,rp) return function(e,tp,eg,ep,ev,re,r,rp)
mg=mg or Duel.GetSynchroMaterial(tp) mg=mg or Duel.GetSynchroMaterial(tp)
local g=Duel.GetMatchingGroup(function(tc) return tc:IsSynchroSummonable(gc(e),mg) end,tp,LOCATION_EXTRA,0,nil) local g=Duel.GetMatchingGroup(function(tc) return synfilter(tc) end,tp,LOCATION_EXTRA,0,nil)
g=g:Filter(function(tc) return tc:IsSynchroSummonable(gc(e),mg) end,nil)
local mat=Group.CreateGroup() local mat=Group.CreateGroup()
local tc=nil local tc=nil
local selected_proc=nil local selected_proc=nil
...@@ -4515,6 +4528,76 @@ function AccelSynchro.GetSummonOperation(mg,gc,skip_hand_count_check,additional_ ...@@ -4515,6 +4528,76 @@ function AccelSynchro.GetSummonOperation(mg,gc,skip_hand_count_check,additional_
end end
assert(tc~=nil) assert(tc~=nil)
assert(selected_proc~=nil) assert(selected_proc~=nil)
AccelSynchro.OverwriteMaterialOperationCode=material_operation
Duel.SynchroSummon(tp,tc,nil,mat,#mat,#mat) Duel.SynchroSummon(tp,tc,nil,mat,#mat,#mat)
end end
end end
-- operation that would be applied on the material
---@alias ACCEL_SYNCHRO_OPERATION_CODE integer
AccelSynchro.SYNCHRO_OPERATION_GRAVE=0x1
AccelSynchro.SYNCHRO_OPERATION_BANISH=0x2
AccelSynchro.SYNCHRO_OPERATION_BANISH_FACEDOWN=0x3
AccelSynchro.SYNCHRO_OPERATION_SHUFFLE=0x4
AccelSynchro.SYNCHRO_OPERATION_DECK_BOTTOM=0x5
AccelSynchro.SYNCHRO_OPERATION_DESTROY=0x6
AccelSynchro.SYNCHRO_OPERATION_DISCARD=0x7
---@return SYNCHRO_OPERATION_FUNCTION
function AccelSynchro.GetOperationByCode(code)
if code==AccelSynchro.SYNCHRO_OPERATION_GRAVE then
return AccelSynchro.GraveMaterial
elseif code==AccelSynchro.SYNCHRO_OPERATION_BANISH then
return AccelSynchro.BanishMaterial
elseif code==AccelSynchro.SYNCHRO_OPERATION_BANISH_FACEDOWN then
return AccelSynchro.BanishMaterialFaceDown
elseif code==AccelSynchro.SYNCHRO_OPERATION_SHUFFLE then
return AccelSynchro.ShuffleMaterial
elseif code==AccelSynchro.SYNCHRO_OPERATION_DECK_BOTTOM then
return AccelSynchro.SendDeckBottomMaterial
elseif code==AccelSynchro.SYNCHRO_OPERATION_DESTROY then
return AccelSynchro.DestroyMaterial
elseif code==AccelSynchro.SYNCHRO_OPERATION_DISCARD then
return AccelSynchro.DiscardMaterial
end
assert(false, string.format("we have an unknown synchro operation code %d",code))
return AccelSynchro.GraveMaterial
end
---@alias SYNCHRO_OPERATION_FUNCTION fun(sg:Card|Group,tp:integer):integer
---@type SYNCHRO_OPERATION_FUNCTION
function AccelSynchro.GraveMaterial(sg,tp)
return Duel.SendtoGrave(sg,REASON_MATERIAL+REASON_SYNCHRO,tp)
end
---@type SYNCHRO_OPERATION_FUNCTION
function AccelSynchro.BanishMaterial(sg,tp)
return Duel.Remove(sg,POS_FACEUP,REASON_MATERIAL+REASON_SYNCHRO,tp)
end
---@type SYNCHRO_OPERATION_FUNCTION
function AccelSynchro.BanishMaterialFaceDown(sg,tp)
return Duel.Remove(sg,POS_FACEDOWN,REASON_MATERIAL+REASON_SYNCHRO,tp)
end
---@type SYNCHRO_OPERATION_FUNCTION
function AccelSynchro.ShuffleMaterial(sg,tp)
return Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_MATERIAL+REASON_SYNCHRO,tp)
end
---@type SYNCHRO_OPERATION_FUNCTION
function AccelSynchro.SendDeckBottomMaterial(sg,tp)
-- prompt user to select order
return aux.PlaceCardsOnDeckBottom(tp,sg,REASON_MATERIAL+REASON_SYNCHRO)
end
---@type SYNCHRO_OPERATION_FUNCTION
function AccelSynchro.DestroyMaterial(sg,tp)
return Duel.Destroy(sg,REASON_MATERIAL+REASON_SYNCHRO,nil,tp)
end
---@type SYNCHRO_OPERATION_FUNCTION
function AccelSynchro.DiscardMaterial(sg,tp)
return Duel.SendtoGrave(sg,REASON_MATERIAL+REASON_SYNCHRO+REASON_DISCARD,tp)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment