Commit 7c8fda75 authored by Vury Leo's avatar Vury Leo

Add Sin パラレルギア and エキセントリック・ボーイ

parent 5910339b
--エキセントリック・ボーイ --エキセントリック・ボーイ
function c16825874.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--synchro custom --synchro custom
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -13,14 +14,27 @@ function c16825874.initial_effect(c) ...@@ -13,14 +14,27 @@ function c16825874.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL) e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_EVENT_PLAYER) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(c16825874.ccon) e2:SetCondition(s.ccon)
e2:SetOperation(c16825874.cop) e2:SetOperation(s.cop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--hand synchro
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(55863245) --- たつのこ
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e3)
--hand synchro limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_TUNER_MATERIAL_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetTarget(s.synlimit)
c:RegisterEffect(e4)
end end
function c16825874.ccon(e,tp,eg,ep,ev,re,r,rp) function s.ccon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO return r==REASON_SYNCHRO
end end
function c16825874.cop(e,tp,eg,ep,ev,re,r,rp) function s.cop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=c:GetReasonCard() local rc=c:GetReasonCard()
--leave redirect --leave redirect
...@@ -43,3 +57,7 @@ function c16825874.cop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,3 +57,7 @@ function c16825874.cop(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true) rc:RegisterEffect(e3,true)
end end
function s.synlimit(e,c)
return c:IsLocation(LOCATION_HAND)
end
--Sin パラレルギア --Sin パラレルギア
function c74509280.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--sin territory --sin territory
c:SetUniqueOnField(1,1,c74509280.uqfilter,LOCATION_MZONE) c:SetUniqueOnField(1,1,s.uqfilter,LOCATION_MZONE)
--synchro custom --synchro custom
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TUNER_MATERIAL_LIMIT) e1:SetCode(EFFECT_TUNER_MATERIAL_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetTarget(c74509280.synlimit) e1:SetTarget(s.synlimit)
e1:SetTargetRange(1,1) e1:SetTargetRange(1,1)
e1:SetValue(LOCATION_HAND) e1:SetValue(LOCATION_HAND)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--hand synchro
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(55863245) --- たつのこ
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e2)
--hand synchro limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TUNER_MATERIAL_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetTarget(s.handsynlimit)
c:RegisterEffect(e3)
end end
function c74509280.sfilter(c) function s.sfilter(c)
return c:IsOriginalCodeRule(598988,1710476,9433350,36521459,37115575,55343236) and not c:IsDisabled() return c:IsOriginalCodeRule(598988,1710476,9433350,36521459,37115575,55343236) and not c:IsDisabled()
end end
function c74509280.uqfilter(c) function s.uqfilter(c)
if Duel.IsPlayerAffectedByEffect(c:GetControler(),75223115) if Duel.IsPlayerAffectedByEffect(c:GetControler(),75223115)
and Duel.IsExistingMatchingCard(c74509280.sfilter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,1,nil) then and Duel.IsExistingMatchingCard(s.sfilter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,1,nil) then
return c:IsCode(74509280) return c:IsCode(id)
else else
return false return false
end end
end end
function c74509280.synlimit(e,c) function s.synlimit(e,c)
return c:IsSetCard(0x23) return c:IsSetCard(0x23)
end end
function s.handsynlimit(e,c)
return c:IsLocation(LOCATION_HAND) and c:IsSetCard(0x23)
end
...@@ -4136,10 +4136,21 @@ function Synchro.BuildStatesFromSelection(selection,tuner_race,tuner_filter,non_ ...@@ -4136,10 +4136,21 @@ function Synchro.BuildStatesFromSelection(selection,tuner_race,tuner_filter,non_
for _,card in ipairs(selection)do for _,card in ipairs(selection)do
local next_states={} local next_states={}
local material_limit_effect=card:IsHasEffect(EFFECT_TUNER_MATERIAL_LIMIT) or card:IsHasEffect(EFFECT_SCRAP_CHIMERA) --- @type fun(c:Card):boolean
local append_material_limit_filter=nil local append_material_limit_filter=aux.TRUE
if material_limit_effect~=nil then -- per-card EFFECT_TUNER_MATERIAL_LIMIT check against already‐selected
append_material_limit_filter=material_limit_effect:GetTarget() local effs={card:IsHasEffect(EFFECT_TUNER_MATERIAL_LIMIT)}
local more_effs={card:IsHasEffect(EFFECT_SCRAP_CHIMERA)}
for _,more_eff in ipairs(more_effs) do
table.insert(effs,more_eff)
end
for _,eff in ipairs(effs) do
if eff and eff:GetTarget() then
local old_append=append_material_limit_filter
append_material_limit_filter=function(c) return eff:GetTarget()(eff,c) and old_append(c) end
end
end end
for _,st in ipairs(states) do for _,st in ipairs(states) do
...@@ -4446,15 +4457,23 @@ function Synchro.CanIncludeMaterial(mc,state,selected,tc, ...@@ -4446,15 +4457,23 @@ function Synchro.CanIncludeMaterial(mc,state,selected,tc,
local append_material_limit_filter local append_material_limit_filter
-- per-card EFFECT_TUNER_MATERIAL_LIMIT check against already‐selected -- per-card EFFECT_TUNER_MATERIAL_LIMIT check against already‐selected
local eff=mc:IsHasEffect(EFFECT_TUNER_MATERIAL_LIMIT) local effs={mc:IsHasEffect(EFFECT_TUNER_MATERIAL_LIMIT)}
if eff then local more_effs={mc:IsHasEffect(EFFECT_SCRAP_CHIMERA)}
append_material_limit_filter=function(c) return eff:GetTarget()(eff,c) end
for _, sel in ipairs(selected) do for _,more_eff in ipairs(more_effs) do
if not append_material_limit_filter(sel) then table.insert(effs,more_eff)
return false,nil end
end
end for _,eff in ipairs(effs) do
end if eff and eff:GetTarget() then
append_material_limit_filter=function(c) return eff:GetTarget()(eff,c) end
for _, sel in ipairs(selected) do
if not append_material_limit_filter(sel) then
return false,nil
end
end
end
end
-- must satisfy at least one of the tuner/non-tuner filters -- must satisfy at least one of the tuner/non-tuner filters
if not (prune_tuner_filter(mc,tc) or prune_non_tuner_filter(mc,tc)) then if not (prune_tuner_filter(mc,tc) or prune_non_tuner_filter(mc,tc)) then
......
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