Commit ab02792f authored by Vury Leo's avatar Vury Leo

Add all accelsynchro

parent db901fb8
......@@ -91,7 +91,17 @@ end
function s.sop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetSynchroMaterial(tp):Filter(Card.IsSetCard,nil,0x192)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil,g):GetFirst()
if sc then Duel.SynchroSummon(tp,sc,nil,g) end
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil,g):GetFirst()
if sc then Duel.SynchroSummon(tp,sc,nil,g) end
else
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(function(mc) return mc:IsSetCard(0x192) end,tp,LOCATION_MZONE,0,nil)
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
mg=mg,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
......@@ -97,11 +97,22 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
end
local g=Duel.GetMatchingGroup(s.scfilter,tp,LOCATION_EXTRA,0,nil,tp,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
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)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
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(0x1ca) end,1,nil)
end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
......@@ -54,9 +54,17 @@ end
function s.sop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,c):GetFirst()
if tc then Duel.SynchroSummon(tp,tc,c) end
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,c):GetFirst()
if tc then Duel.SynchroSummon(tp,tc,c) end
else
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
gc=function() return c end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
......
--メルフィー・ラッシィ
function c34800281.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(34800281,0))
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,34800281)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMING_CHAIN_END+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(c34800281.syncon)
e1:SetTarget(c34800281.syntg)
e1:SetOperation(c34800281.synop)
e1:SetCondition(s.syncon)
e1:SetTarget(s.syntg)
e1:SetOperation(s.synop)
c:RegisterEffect(e1)
--be material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(34800281,1))
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,34800282)
e2:SetCondition(c34800281.xyzcon)
e2:SetTarget(c34800281.xyztg)
e2:SetOperation(c34800281.xyzop)
e2:SetCondition(s.xyzcon)
e2:SetTarget(s.xyztg)
e2:SetOperation(s.xyzop)
c:RegisterEffect(e2)
--
if not c34800281.global_check then
c34800281.global_check=true
if not s.global_check then
s.global_check=true
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_TO_HAND)
e0:SetOperation(c34800281.regop)
e0:SetOperation(s.regop)
Duel.RegisterEffect(e0,0)
end
end
function c34800281.cfilter(c,tp)
function s.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
and (c:GetPreviousRaceOnField()&RACE_BEAST)>0
and c:IsPreviousPosition(POS_FACEUP) and not c:IsCode(34800281)
and c:IsPreviousPosition(POS_FACEUP) and not c:IsCode(id)
end
function c34800281.regop(e,tp,eg,ep,ev,re,r,rp)
function s.regop(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
if eg:IsExists(c34800281.cfilter,1,nil,p) then
Duel.RegisterFlagEffect(p,34800281,RESET_PHASE+PHASE_END,0,1)
if eg:IsExists(s.cfilter,1,nil,p) then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1)
end
end
end
function c34800281.syncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,34800281)>0
function s.syncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id)>0
end
function c34800281.syntg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.syntg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c34800281.synhfilter(c,sc,tuner)
function s.synhfilter(c,sc,tuner)
return c:IsCanBeSynchroMaterial(sc,tuner) and c:IsSetCard(0x146)
end
function c34800281.synfilter(c,mc,tp)
local mg=Duel.GetMatchingGroup(c34800281.synhfilter,tp,LOCATION_HAND,0,nil,c,mc)
function s.synfilter(c,mc,tp)
local mg=Duel.GetMatchingGroup(s.synhfilter,tp,LOCATION_HAND,0,nil,c,mc)
mg:AddCard(mc)
return c:IsSynchroSummonable(mc,mg) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c34800281.synop(e,tp,eg,ep,ev,re,r,rp)
function s.synop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if Duel.IsExistingMatchingCard(c34800281.synfilter,tp,LOCATION_EXTRA,0,1,nil,c,tp)
and Duel.SelectYesNo(tp,aux.Stringid(34800281,2)) then
if Duel.IsExistingMatchingCard(s.synfilter,tp,LOCATION_EXTRA,0,1,nil,c,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local fc=Duel.SelectMatchingCard(tp,c34800281.synfilter,tp,LOCATION_EXTRA,0,1,1,nil,c,tp):GetFirst()
local mg=Duel.GetMatchingGroup(c34800281.synhfilter,tp,LOCATION_HAND,0,nil,fc,c)
mg:AddCard(c)
Duel.SynchroSummon(tp,fc,c,mg)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local fc=Duel.SelectMatchingCard(tp,s.synfilter,tp,LOCATION_EXTRA,0,1,1,nil,c,tp):GetFirst()
local mg=Duel.GetMatchingGroup(s.synhfilter,tp,LOCATION_HAND,0,nil,fc,c)
mg:AddCard(c)
Duel.SynchroSummon(tp,fc,c,mg)
else
local mg=Duel.GetMatchingGroup(function(mc) return mc:IsSetCard(0x146) end,tp,LOCATION_HAND,0,nil)
mg:AddCard(c)
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
gc=function() return c end,
mg=mg,
skip_hand_count_check=true,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c34800281.xyzcon(e,tp,eg,ep,ev,re,r,rp)
function s.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c34800281.xyzfilter(c)
function s.xyzfilter(c)
return c:IsType(TYPE_XYZ) and c:IsRace(RACE_BEAST) and c:IsFaceup()
end
function c34800281.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c34800281.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c34800281.xyzfilter,tp,LOCATION_MZONE,0,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c34800281.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function c34800281.xyzop(e,tp,eg,ep,ev,re,r,rp)
function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
......
......@@ -100,11 +100,22 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
end
local g=Duel.GetMatchingGroup(s.scfilter,tp,LOCATION_EXTRA,0,nil,tp,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
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)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
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:IsRace(RACE_WARRIOR) end,1,nil)
end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
--アクセル・シンクロン
function c37675907.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
......@@ -8,70 +9,70 @@ function c37675907.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c37675907.regcon)
e1:SetOperation(c37675907.regop)
e1:SetCondition(s.regcon)
e1:SetOperation(s.regop)
c:RegisterEffect(e1)
--lv
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(37675907,0))
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c37675907.tgcost)
e2:SetTarget(c37675907.tgtg)
e2:SetOperation(c37675907.tgop)
e2:SetCost(s.tgcost)
e2:SetTarget(s.tgtg)
e2:SetOperation(s.tgop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(37675907,1))
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c37675907.spcon)
e3:SetTarget(c37675907.sptg)
e3:SetOperation(c37675907.spop)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function c37675907.regcon(e,tp,eg,ep,ev,re,r,rp)
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c37675907.regop(e,tp,eg,ep,ev,re,r,rp)
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c37675907.splimit)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function c37675907.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(37675907) and bit.band(sumtype,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(id) and bit.band(sumtype,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
end
function c37675907.filter(c)
function s.filter(c)
return c:GetLevel()>0 and c:IsSetCard(0x1017) and c:IsAbleToGraveAsCost()
end
function c37675907.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c37675907.filter,tp,LOCATION_DECK,0,1,nil) end
function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c37675907.filter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
end
function c37675907.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=e:GetHandler():GetLevel()
if chk==0 then return lv>0 end
local opt
if e:GetLabelObject():GetLevel()<lv then
opt=Duel.SelectOption(tp,aux.Stringid(37675907,2),aux.Stringid(37675907,3))
opt=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))
else
opt=Duel.SelectOption(tp,aux.Stringid(37675907,2))
opt=Duel.SelectOption(tp,aux.Stringid(id,2))
end
e:SetLabel(opt)
end
function c37675907.tgop(e,tp,eg,ep,ev,re,r,rp)
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=e:GetLabelObject():GetLevel()
if c:IsRelateToEffect(e) and c:IsFaceup() then
......@@ -87,22 +88,30 @@ function c37675907.tgop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
end
function c37675907.spcon(e,tp,eg,ep,ev,re,r,rp)
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c37675907.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 return not e:GetHandler():IsStatus(STATUS_CHAINING)
and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c37675907.spop(e,tp,eg,ep,ev,re,r,rp)
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
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,{
gc=function() return c end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
--天盃龍パイドラ
local s,id,o=GetID()
function c39931513.initial_effect(c)
function s.initial_effect(c)
--to hand or set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
......@@ -77,8 +77,16 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
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,{
gc=function() return c end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
......@@ -118,11 +118,22 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
end
local g=Duel.GetMatchingGroup(s.scfilter,tp,LOCATION_EXTRA,0,nil,tp,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
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)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
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(0x1a2) end,1,nil)
end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
--烙印の即凶劇
function c45675980.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -7,15 +8,15 @@ function c45675980.initial_effect(c)
c:RegisterEffect(e0)
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45675980,0))
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,45675980)
e1:SetTarget(c45675980.sctg)
e1:SetOperation(c45675980.scop)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sctg)
e1:SetOperation(s.scop)
c:RegisterEffect(e1)
--macro cosmos
local e2=Effect.CreateEffect(c)
......@@ -24,48 +25,59 @@ function c45675980.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
e2:SetCondition(c45675980.rmcon)
e2:SetTarget(c45675980.rmtg)
e2:SetCondition(s.rmcon)
e2:SetTarget(s.rmtg)
c:RegisterEffect(e2)
end
function c45675980.syncheck(g,tp,syncard)
function s.syncheck(g,tp,syncard)
return g:IsExists(Card.IsRace,1,nil,RACE_DRAGON) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
end
function c45675980.spfilter(c,tp,mg)
return mg:CheckSubGroup(c45675980.syncheck,2,#mg,tp,c)
function s.spfilter(c,tp,mg)
return mg:CheckSubGroup(s.syncheck,2,#mg,tp,c)
end
function c45675980.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
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
return Duel.IsExistingMatchingCard(c45675980.spfilter,tp,LOCATION_EXTRA,0,1,nil,tp,mg)
return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,tp,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c45675980.scop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
local g=Duel.GetMatchingGroup(c45675980.spfilter,tp,LOCATION_EXTRA,0,nil,tp,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tg=mg:SelectSubGroup(tp,c45675980.syncheck,false,2,#mg,tp,sc)
Duel.SynchroSummon(tp,sc,nil,tg,#tg-1,#tg-1)
function s.scop(e,tp,eg,ep,ev,re,r,rp)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,tp,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
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)
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
function c45675980.rmcon(e)
function s.rmcon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsSetCard),tp,LOCATION_MZONE,0,1,nil,0x188)
end
function c45675980.rmtg(e,c)
function s.rmtg(e,c)
local tp=e:GetHandlerPlayer()
local b1=c:IsReason(REASON_RITUAL) and c:IsReason(REASON_RELEASE)
local b2=c:IsReason(REASON_FUSION+REASON_SYNCHRO+REASON_LINK)
......
......@@ -63,43 +63,10 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SynchroSummon(tp,tc,c)
else
local mg=Duel.GetSynchroMaterial(tp)
local mat=Group.CreateGroup()
local tc=nil
local selected_proc=nil
while #mat==0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
tc=g:Select(tp,1,1,nil):GetFirst()
local procs={tc:IsHasEffect(EFFECT_SPSUMMON_PROC,tp)}
local avaliable_procs={}
for _,proc in ipairs(procs) do
local con=proc:GetCondition()
if con(e,tc,c,mg,1,math.huge) then
table.insert(avaliable_procs,proc)
end
end
if #avaliable_procs==0 then
--- fallback
Duel.SynchroSummon(tp,tc,c)
end
assert(#avaliable_procs>0,"target card does not support new synchro yet")
selected_proc=avaliable_procs[1]
if #avaliable_procs>1 then
local opts={}
for _,avaliable_proc in ipairs(avaliable_procs) do
table.insert(opts,avaliable_proc:GetDescription())
end
local proc_index=Duel.SelectOption(tp,table.unpack(opts))+1
selected_proc=avaliable_procs[proc_index]
end
local target=selected_proc:GetTarget()
if target(selected_proc,tp,eg,ep,ev,re,r,rp,1,tc,c,mg,1,math.huge) then
mat=selected_proc:GetLabelObject()
end
end
assert(tc~=nil)
assert(selected_proc~=nil)
Duel.SynchroSummon(tp,tc,nil,mat,#mat,#mat)
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
gc=function() return c end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
......@@ -78,8 +78,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
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,{
gc=function() return c end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
--天盃龍ファドラ
function c65326118.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--Special summon from grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65326118,0))
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,65326118)
e1:SetTarget(c65326118.sptg)
e1:SetOperation(c65326118.spop)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -25,62 +26,70 @@ function c65326118.initial_effect(c)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c65326118.indtg)
e4:SetTarget(s.indtg)
e4:SetValue(1)
c:RegisterEffect(e4)
--synchro summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(65326118,2))
e5:SetDescription(aux.Stringid(id,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END+TIMING_BATTLE_END)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c65326118.sccon)
e5:SetTarget(c65326118.sctg)
e5:SetOperation(c65326118.scop)
e5:SetCondition(s.sccon)
e5:SetTarget(s.sctg)
e5:SetOperation(s.scop)
c:RegisterEffect(e5)
end
function c65326118.filter(c,e,tp)
function s.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevelBelow(4)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65326118.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c65326118.filter(chkc,e,tp) end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c65326118.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(65326118,0))
and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,0))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c65326118.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)
end
function c65326118.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 tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c65326118.indtg(e,c)
function s.indtg(e,c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE)
end
function c65326118.sccon(e,tp,eg,ep,ev,re,r,rp)
function s.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c65326118.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.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(65326118,2))
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,2))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c65326118.scop(e,tp,eg,ep,ev,re,r,rp)
function s.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
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,{
gc=function() return c end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
......@@ -88,9 +88,17 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
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,{
gc=function() return c end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
else
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
......
--シューティング・ライザー・ドラゴン
function c68431965.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--lv
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(68431965,0))
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,68431965)
e1:SetCondition(c68431965.lvlcon)
e1:SetTarget(c68431965.lvtg1)
e1:SetOperation(c68431965.lvop1)
e1:SetCountLimit(1,id)
e1:SetCondition(s.lvlcon)
e1:SetTarget(s.lvtg1)
e1:SetOperation(s.lvop1)
c:RegisterEffect(e1)
--synchro effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(68431965,1))
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(c68431965.sccon)
e2:SetTarget(c68431965.sctarg)
e2:SetOperation(c68431965.scop)
e2:SetCondition(s.sccon)
e2:SetTarget(s.sctarg)
e2:SetOperation(s.scop)
c:RegisterEffect(e2)
end
function c68431965.lvlcon(e,tp,eg,ep,ev,re,r,rp)
function s.lvlcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c68431965.lvtg1(e,tp,eg,ep,ev,re,r,rp,chk)
function s.lvtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e)
and Duel.IsExistingMatchingCard(c68431965.tgfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetLevel()) end
and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetLevel()) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c68431965.tgfilter(c,lv)
function s.tgfilter(c,lv)
return c:IsLevelBelow(lv-1) and c:IsAbleToGrave()
end
function c68431965.lvop1(e,tp,eg,ep,ev,re,r,rp)
function s.lvop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c68431965.tgfilter,tp,LOCATION_DECK,0,1,1,nil,c:GetLevel())
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,c:GetLevel())
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE)
and c:IsFaceup() then
local lv=g:GetFirst():GetLevel()
......@@ -59,31 +60,39 @@ function c68431965.lvop1(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0)
e2:SetValue(c68431965.aclimit)
e2:SetValue(s.aclimit)
e2:SetLabel(g:GetFirst():GetCode())
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c68431965.aclimit(e,re,tp)
function s.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER)
end
function c68431965.sccon(e,tp,eg,ep,ev,re,r,rp)
function s.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c68431965.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c68431965.scop(e,tp,eg,ep,ev,re,r,rp)
function s.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
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,{
gc=function() return c end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
--天盃龍チュンドラ
function c91810826.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--Self special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(91810826,0))
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,91810826)
e1:SetCondition(c91810826.spcon)
e1:SetTarget(c91810826.sptg)
e1:SetOperation(c91810826.spop)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--Special summon from deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(91810826,1))
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_BATTLE_START)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,91810827)
e2:SetTarget(c91810826.sptg2)
e2:SetOperation(c91810826.spop2)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
--Synchro summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(91810826,2))
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END+TIMING_BATTLE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c91810826.sccon)
e3:SetTarget(c91810826.sctg)
e3:SetOperation(c91810826.scop)
e3:SetCondition(s.sccon)
e3:SetTarget(s.sctg)
e3:SetOperation(s.scop)
c:RegisterEffect(e3)
end
function c91810826.cfilter(c)
function s.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE)
end
function c91810826.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c91810826.cfilter,tp,LOCATION_MZONE,0,1,nil)
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c91810826.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 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c91810826.spop(e,tp,eg,ep,ev,re,r,rp)
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c91810826.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevelBelow(4) and not c:IsCode(91810826)
function s.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevelBelow(4) and not c:IsCode(id)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c91810826.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c91810826.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(91810826,1))
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,1))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c91810826.spop2(e,tp,eg,ep,ev,re,r,rp)
function s.spop2(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,c91810826.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c91810826.sccon(e,tp,eg,ep,ev,re,r,rp)
function s.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c91810826.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.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(91810826,2))
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,2))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c91810826.scop(e,tp,eg,ep,ev,re,r,rp)
function s.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
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,{
gc=function() return c end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
......@@ -65,8 +65,16 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
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,{
gc=function() return c end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
--TG ワンダー・マジシャン
function c98558751.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x27),1)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98558751,0))
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c98558751.descon)
e1:SetTarget(c98558751.destg)
e1:SetOperation(c98558751.desop)
e1:SetCondition(s.descon)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98558751,1))
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c98558751.drcon)
e2:SetTarget(c98558751.drtg)
e2:SetOperation(c98558751.drop)
e2:SetCondition(s.drcon)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
--synchro effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98558751,2))
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetCondition(c98558751.sccon)
e3:SetTarget(c98558751.sctg)
e3:SetOperation(c98558751.scop)
e3:SetCondition(s.sccon)
e3:SetTarget(s.sctg)
e3:SetOperation(s.scop)
c:RegisterEffect(e3)
end
function c98558751.descon(e,tp,eg,ep,ev,re,r,rp)
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c98558751.filter(c)
function s.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c98558751.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c98558751.filter(chkc) end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c98558751.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c98558751.desop(e,tp,eg,ep,ev,re,r,rp)
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c98558751.drcon(e,tp,eg,ep,ev,re,r,rp)
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function c98558751.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c98558751.drop(e,tp,eg,ep,ev,re,r,rp)
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
function c98558751.sccon(e,tp,eg,ep,ev,re,r,rp)
function s.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c98558751.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.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98558751.scop(e,tp,eg,ep,ev,re,r,rp)
function s.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
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,{
gc=function() return c end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
--TG スター・ガーディアン
function c99937842.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x27),1)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(99937842,0))
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,99937842)
e1:SetTarget(c99937842.thtg)
e1:SetOperation(c99937842.thop)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(99937842,1))
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,99937843)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c99937842.sptg)
e2:SetOperation(c99937842.spop)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--synchro effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(99937842,2))
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetCondition(c99937842.sccon)
e3:SetTarget(c99937842.sctg)
e3:SetOperation(c99937842.scop)
e3:SetCondition(s.sccon)
e3:SetTarget(s.sctg)
e3:SetOperation(s.scop)
c:RegisterEffect(e3)
end
function c99937842.thfilter(c,tp)
function s.thfilter(c,tp)
return c:IsSetCard(0x27) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c99937842.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c99937842.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c99937842.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c99937842.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local sg=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0)
end
function c99937842.thop(e,tp,eg,ep,ev,re,r,rp)
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 c99937842.spfilter(c,e,tp)
function s.spfilter(c,e,tp)
return c:IsSetCard(0x27) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c99937842.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 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c99937842.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
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 c99937842.spop(e,tp,eg,ep,ev,re,r,rp)
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,c99937842.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c99937842.sccon(e,tp,eg,ep,ev,re,r,rp)
function s.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c99937842.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.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c99937842.scop(e,tp,eg,ep,ev,re,r,rp)
function s.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
local opt=Duel.SelectOption(tp,1164,1379)
if opt==0 then
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,{
gc=function() return c end,
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end
end
This diff is collapsed.
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