Commit 88ab5880 authored by Vury Leo's avatar Vury Leo

add スクラップ・キマイラ

parent a3790828
...@@ -66,7 +66,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetSynchroMaterial(tp) local mg=Duel.GetSynchroMaterial(tp)
local mat=Group.CreateGroup() local mat=Group.CreateGroup()
local tc=nil local tc=nil
local proc=nil local selected_proc=nil
while #mat==0 do while #mat==0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
tc=g:Select(tp,1,1,nil):GetFirst() tc=g:Select(tp,1,1,nil):GetFirst()
...@@ -83,22 +83,22 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,22 +83,22 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.SynchroSummon(tp,tc,c) Duel.SynchroSummon(tp,tc,c)
end end
assert(#avaliable_procs>0,"target card does not support new synchro yet") assert(#avaliable_procs>0,"target card does not support new synchro yet")
proc=avaliable_procs[1] selected_proc=avaliable_procs[1]
if #avaliable_procs>1 then if #avaliable_procs>1 then
local opts={} local opts={}
for _,avaliable_proc in ipairs(avaliable_procs) do for _,avaliable_proc in ipairs(avaliable_procs) do
table.insert(opts,avaliable_proc:GetDescription()) table.insert(opts,avaliable_proc:GetDescription())
end end
local proc_index=Duel.SelectOption(tp,table.unpack(opts))+1 local proc_index=Duel.SelectOption(tp,table.unpack(opts))+1
proc=avaliable_procs[proc_index] selected_proc=avaliable_procs[proc_index]
end end
local target=proc:GetTarget() local target=selected_proc:GetTarget()
if target(proc,tp,eg,ep,ev,re,r,rp,1,tc,c,mg,1,math.huge) then if target(selected_proc,tp,eg,ep,ev,re,r,rp,1,tc,c,mg,1,math.huge) then
mat=proc:GetLabelObject() mat=selected_proc:GetLabelObject()
end end
end end
assert(tc~=nil) assert(tc~=nil)
assert(proc~=nil) assert(selected_proc~=nil)
Duel.SynchroSummon(tp,tc,nil,mat,#mat,#mat) Duel.SynchroSummon(tp,tc,nil,mat,#mat,#mat)
end end
end end
......
--スクラップ・キマイラ --スクラップ・キマイラ
function c56746202.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SCRAP_CHIMERA) Duel.EnableGlobalFlag(GLOBALFLAG_SCRAP_CHIMERA)
--summon success --summon success
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(56746202,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_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c56746202.sumtg) e1:SetTarget(s.sumtg)
e1:SetOperation(c56746202.sumop) e1:SetOperation(s.sumop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--synchro custom --synchro custom
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(c56746202.synlimit) e2:SetValue(s.synlimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(56746202,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SCRAP_CHIMERA) e3:SetCode(EFFECT_SCRAP_CHIMERA)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(c56746202.synlimit2) e3:SetTarget(s.matfilter)
e3:SetValue(s.synlimit2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c56746202.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsSetCard(0x24) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x24) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c56746202.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c56746202.filter(chkc,e,tp) end 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 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c56746202.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,c56746202.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)
end end
function c56746202.sumop(e,tp,eg,ep,ev,re,r,rp) function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c56746202.synlimit(e,c) function s.synlimit(e,c)
if not c then return false end if not c then return false end
return not c:IsSetCard(0x24) return not c:IsSetCard(0x24)
end end
function c56746202.synlimit2(e,c) function s.synlimit2(e,c)
return not c:IsSetCard(0x24) return not c:IsSetCard(0x24)
end end
function s.matfilter(e,c)
return c:IsSetCard(0x24)
end
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
function c76774528.initial_effect(c) function c76774528.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
Synchro.AddSynchroProcedure(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--Destroy --Destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -3913,7 +3913,7 @@ function Synchro.BuildStatesFromSelection(selection,tuner_race,tuner_filter,non_ ...@@ -3913,7 +3913,7 @@ function Synchro.BuildStatesFromSelection(selection,tuner_race,tuner_filter,non_
for idx,card in ipairs(selection)do for idx,card in ipairs(selection)do
local next_states={} local next_states={}
local material_limit_effect=card:IsHasEffect(EFFECT_TUNER_MATERIAL_LIMIT) local material_limit_effect=card:IsHasEffect(EFFECT_TUNER_MATERIAL_LIMIT) or card:IsHasEffect(EFFECT_SCRAP_CHIMERA)
local append_material_limit_filter=nil local append_material_limit_filter=nil
if material_limit_effect~=nil then if material_limit_effect~=nil then
append_material_limit_filter=material_limit_effect:GetTarget() append_material_limit_filter=material_limit_effect:GetTarget()
......
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