Commit 5910339b authored by Vury Leo's avatar Vury Leo

fix 救世竜 セイヴァー・ドラゴン

parent 6f34e2a9
--アクセルシンクロ・スターダスト・ドラゴン --アクセルシンクロ・スターダスト・ドラゴン
function c30983281.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,44508094) aux.AddCodeList(c,44508094)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
...@@ -7,66 +8,66 @@ function c30983281.initial_effect(c) ...@@ -7,66 +8,66 @@ function c30983281.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30983281,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:SetCountLimit(1,30983281) e1:SetCountLimit(1,id)
e1:SetCondition(c30983281.spcon) e1:SetCondition(s.spcon)
e1:SetTarget(c30983281.sptg) e1:SetTarget(s.sptg)
e1:SetOperation(c30983281.spop) e1:SetOperation(s.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--synchro effect --synchro effect
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30983281,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,30983282) e2:SetCountLimit(1,id+o)
e2:SetCondition(c30983281.sccon) e2:SetCondition(s.sccon)
e2:SetCost(c30983281.sccost) e2:SetCost(s.sccost)
e2:SetTarget(c30983281.sctg) e2:SetTarget(s.sctg)
e2:SetOperation(c30983281.scop) e2:SetOperation(s.scop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c30983281.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 c30983281.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsLevelBelow(2) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(2) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c30983281.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 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c30983281.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function c30983281.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 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c30983281.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
function c30983281.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_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function c30983281.excostfilter(c,tp) function s.excostfilter(c,tp)
return c:IsAbleToRemoveAsCost() and c:IsHasEffect(84012625,tp) return c:IsAbleToRemoveAsCost() and c:IsHasEffect(84012625,tp)
end end
function c30983281.synfilter(c,tp,g) function s.synfilter(c,tp,g)
return c:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,c) return c:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,c)
end end
function c30983281.syncheck(g,tp,exc) function s.syncheck(g,tp,exc)
return Duel.IsExistingMatchingCard(c30983281.synfilter,tp,LOCATION_EXTRA,0,1,exc,tp,g) return Duel.IsExistingMatchingCard(s.synfilter,tp,LOCATION_EXTRA,0,1,exc,tp,g)
end end
function c30983281.spcheck(c,tp,rc,mg,opchk) function s.spcheck(c,tp,rc,mg,opchk)
return Duel.GetLocationCountFromEx(tp,tp,rc,c)>0 return Duel.GetLocationCountFromEx(tp,tp,rc,c)>0
and (opchk or mg:CheckSubGroup(c30983281.syncheck,2,#mg,tp,c)) and (opchk or mg:CheckSubGroup(s.syncheck,2,#mg,tp,c))
end end
function c30983281.scfilter(c,e,tp,rc,chkrel,chknotrel,tgchk,opchk) function s.scfilter(c,e,tp,rc,chkrel,chknotrel,tgchk,opchk)
if not (c:IsCode(44508094) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)) then return false end if not (c:IsCode(44508094) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)) then return false end
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
...@@ -75,21 +76,21 @@ function c30983281.scfilter(c,e,tp,rc,chkrel,chknotrel,tgchk,opchk) ...@@ -75,21 +76,21 @@ function c30983281.scfilter(c,e,tp,rc,chkrel,chknotrel,tgchk,opchk)
end end
mg:AddCard(c) mg:AddCard(c)
if tgchk then if tgchk then
return c30983281.spcheck(c,tp,nil,mg,opchk) return s.spcheck(c,tp,nil,mg,opchk)
else else
return (chkrel and c30983281.spcheck(c,tp,rc,mg-rc)) or (chknotrel and c30983281.spcheck(c,tp,nil,mg)) return (chkrel and s.spcheck(c,tp,rc,mg-rc)) or (chknotrel and s.spcheck(c,tp,nil,mg))
end end
end end
function c30983281.sccost(e,tp,eg,ep,ev,re,r,rp,chk) function s.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local ect1=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp] local ect1=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
local ect2=aux.ExtraDeckSummonCountLimit and Duel.IsPlayerAffectedByEffect(tp,92345028) local ect2=aux.ExtraDeckSummonCountLimit and Duel.IsPlayerAffectedByEffect(tp,92345028)
and aux.ExtraDeckSummonCountLimit[tp] and aux.ExtraDeckSummonCountLimit[tp]
local g=Duel.GetMatchingGroup(c30983281.excostfilter,tp,LOCATION_GRAVE,0,nil,tp) local g=Duel.GetMatchingGroup(s.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
local chkrel=c:IsReleasable() local chkrel=c:IsReleasable()
local chknotrel=g:GetCount()>0 local chknotrel=g:GetCount()>0
local b1=chkrel and Duel.IsExistingMatchingCard(c30983281.scfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,chkrel,nil) local b1=chkrel and Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,chkrel,nil)
local b2=chknotrel and Duel.IsExistingMatchingCard(c30983281.scfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,nil,chknotrel) local b2=chknotrel and Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,nil,chknotrel)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and (not ect1 or ect1>1) and (not ect2 or ect2>1) and (b1 or b2) and (not ect1 or ect1>1) and (not ect2 or ect2>1) and (b1 or b2)
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) end and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) end
...@@ -110,7 +111,7 @@ function c30983281.sccost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -110,7 +111,7 @@ function c30983281.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(rc,REASON_COST) Duel.Release(rc,REASON_COST)
end end
end end
function c30983281.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
if e:IsCostChecked() then return true end if e:IsCostChecked() then return true end
local c=e:GetHandler() local c=e:GetHandler()
...@@ -120,26 +121,26 @@ function c30983281.sctg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -120,26 +121,26 @@ function c30983281.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsPlayerCanSpecialSummonCount(tp,2) return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and (not ect1 or ect1>1) and (not ect2 or ect2>1) and (not ect1 or ect1>1) and (not ect2 or ect2>1)
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(c30983281.scfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,nil,nil,true) and Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,nil,nil,true)
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 c30983281.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()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c30983281.scfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c,nil,nil,true,true) local g=Duel.SelectMatchingCard(tp,s.scfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c,nil,nil,true,true)
local tc=g:GetFirst() local tc=g:GetFirst()
local res=false local res=false
if tc then if tc then
tc:SetMaterial(nil) tc:SetMaterial(nil)
if Duel.SpecialSummonStep(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) then if Duel.SpecialSummonStep(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30983281,2)) e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c30983281.immval) e1:SetValue(s.immval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetOwnerPlayer(tp) e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
...@@ -152,21 +153,40 @@ function c30983281.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -152,21 +153,40 @@ function c30983281.scop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil) local tg=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil)
if res and tg:GetCount()>0 then if res and tg:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local opt=Duel.SelectOption(tp,1164,1379)
local sg=tg:Select(tp,1,1,nil) if opt==0 then
local e1=Effect.CreateEffect(c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
e1:SetDescription(aux.Stringid(30983281,2)) local sg=tg:Select(tp,1,1,nil)
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetDescription(aux.Stringid(id,2))
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c30983281.immval) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) e1:SetRange(LOCATION_MZONE)
e1:SetOwnerPlayer(tp) e1:SetValue(s.immval)
sg:GetFirst():RegisterEffect(e1,true) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
Duel.SynchroSummon(tp,sg:GetFirst(),nil) e1:SetOwnerPlayer(tp)
sg:GetFirst():RegisterEffect(e1,true)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
else
local synchro_effect=AccelSynchro.CreateSummonEffect(c,{
stage_x_operation=function(e,tc)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.immval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
e1:SetOwnerPlayer(tp)
tc:GetFirst():RegisterEffect(e1,true)
end
})
synchro_effect:GetOperation()(e,tp,eg,ep,ev,re,r,rp)
end
end end
end end
function c30983281.immval(e,te) function s.immval(e,te)
return te:GetOwnerPlayer()~=e:GetOwnerPlayer() and te:IsActivated() return te:GetOwnerPlayer()~=e:GetOwnerPlayer() and te:IsActivated()
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