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)
local mg=Duel.GetSynchroMaterial(tp)
local mat=Group.CreateGroup()
local tc=nil
local proc=nil
local selected_proc=nil
while #mat==0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
tc=g:Select(tp,1,1,nil):GetFirst()
......@@ -83,22 +83,22 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.SynchroSummon(tp,tc,c)
end
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
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
proc=avaliable_procs[proc_index]
selected_proc=avaliable_procs[proc_index]
end
local target=proc:GetTarget()
if target(proc,tp,eg,ep,ev,re,r,rp,1,tc,c,mg,1,math.huge) then
mat=proc:GetLabelObject()
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(proc~=nil)
assert(selected_proc~=nil)
Duel.SynchroSummon(tp,tc,nil,mat,#mat,#mat)
end
end
......
--スクラップ・キマイラ
function c56746202.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SCRAP_CHIMERA)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(56746202,0))
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c56746202.sumtg)
e1:SetOperation(c56746202.sumop)
e1:SetTarget(s.sumtg)
e1:SetOperation(s.sumop)
c:RegisterEffect(e1)
--synchro custom
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(c56746202.synlimit)
e2:SetValue(s.synlimit)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(56746202,1))
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SCRAP_CHIMERA)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(c56746202.synlimit2)
e3:SetTarget(s.matfilter)
e3:SetValue(s.synlimit2)
c:RegisterEffect(e3)
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)
end
function c56746202.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
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 s.filter(chkc,e,tp) end
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)
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)
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()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c56746202.synlimit(e,c)
function s.synlimit(e,c)
if not c then return false end
return not c:IsSetCard(0x24)
end
function c56746202.synlimit2(e,c)
function s.synlimit2(e,c)
return not c:IsSetCard(0x24)
end
function s.matfilter(e,c)
return c:IsSetCard(0x24)
end
......@@ -2,6 +2,7 @@
function c76774528.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
Synchro.AddSynchroProcedure(c)
c:EnableReviveLimit()
--Destroy
local e1=Effect.CreateEffect(c)
......
......@@ -3913,7 +3913,7 @@ function Synchro.BuildStatesFromSelection(selection,tuner_race,tuner_filter,non_
for idx,card in ipairs(selection)do
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
if material_limit_effect~=nil then
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