Commit 4596497c authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 0849337c
No preview for this file type
...@@ -149,12 +149,12 @@ function s.chtg(_tg) ...@@ -149,12 +149,12 @@ function s.chtg(_tg)
return _tg(e,c,...) return _tg(e,c,...)
end end
end end
function s.GetSynMaterials(tp,syncard) function s.SMatCatch(tp,syncard)
local g=aux.GetSynMaterials(tp,syncard) local g=aux.GetSynMaterials(tp,syncard)
local mg=Duel.GetMatchingGroup(s.IsCanBeSynchroMaterial,tp,0x10,0x1c,g,syncard) local mg=Duel.GetMatchingGroup(s.SMatCheck,tp,0x10,0x1c,g,syncard)
return Group.__add(g,mg) return Group.__add(g,mg)
end end
function s.IsCanBeSynchroMaterial(c,syncard) function s.SMatCheck(c,syncard)
if not (c:IsCanBeSynchroMaterial(syncard) or c:IsLevel(0)) then return false end if not (c:IsCanBeSynchroMaterial(syncard) or c:IsLevel(0)) then return false end
if c:IsStatus(STATUS_FORBIDDEN) then return false end if c:IsStatus(STATUS_FORBIDDEN) then return false end
if c:IsHasEffect(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) then return false end if c:IsHasEffect(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) then return false end
...@@ -170,7 +170,7 @@ function s.IsCanBeSynchroMaterial(c,syncard) ...@@ -170,7 +170,7 @@ function s.IsCanBeSynchroMaterial(c,syncard)
else return false end else return false end
return true return true
end end
function s.GetSynchroLevel(c,sc) function s.SLevelCal(c,sc)
local lv=c:GetSynchroLevel(sc) local lv=c:GetSynchroLevel(sc)
local tp=sc:GetControler() local tp=sc:GetControler()
local b1=c:IsLocation(LOCATION_GRAVE) and c:IsLevel(0) and (c:GetControler()~=tp or sc:GetOriginalCode()==53752002) local b1=c:IsLocation(LOCATION_GRAVE) and c:IsLevel(0) and (c:GetControler()~=tp or sc:GetOriginalCode()==53752002)
...@@ -186,7 +186,7 @@ function s.lindfilter(c) ...@@ -186,7 +186,7 @@ function s.lindfilter(c)
end end
function s.lvs(c,syncard) function s.lvs(c,syncard)
if not c then return 0 end if not c then return 0 end
local lv=s.GetSynchroLevel(c,syncard) local lv=s.SLevelCal(c,syncard)
local lv2=lv>>16 local lv2=lv>>16
lv=lv&0xffff lv=lv&0xffff
if lv2>0 then return lv,lv2 else return lv end if lv2>0 then return lv,lv2 else return lv end
...@@ -260,21 +260,21 @@ function s.SynMixCondition(e,c,smat,mg1,min,max) ...@@ -260,21 +260,21 @@ function s.SynMixCondition(e,c,smat,mg1,min,max)
if Duel.IsPlayerAffectedByEffect(tp,8173184) then if Duel.IsPlayerAffectedByEffect(tp,8173184) then
Duel.RegisterFlagEffect(tp,8173184+1,0,0,1) Duel.RegisterFlagEffect(tp,8173184+1,0,0,1)
end end
if smat and not s.IsCanBeSynchroMaterial(smat,c) then if smat and not s.SMatCheck(smat,c) then
Duel.ResetFlagEffect(tp,8173184+1) Duel.ResetFlagEffect(tp,8173184+1)
return false return false
end end
local mg local mg
local mgchk=false local mgchk=false
if mg1 then if mg1 then
mg=mg1:Filter(s.IsCanBeSynchroMaterial,nil,c) mg=mg1:Filter(s.SMatCheck,nil,c)
mgchk=true mgchk=true
else else
mg=s.GetSynMaterials(tp,c) mg=s.SMatCatch(tp,c)
end end
if smat~=nil then mg:AddCard(smat) end if smat~=nil then mg:AddCard(smat) end
Auxiliary.SubGroupCaptured=Group.CreateGroup() Auxiliary.SubGroupCaptured=Group.CreateGroup()
SNNM.SubGroupParams={s.slfilter,s.GetSynchroLevel,nil,true,true,{c},{c}} SNNM.SubGroupParams={s.slfilter,s.SLevelCal,nil,true,true,{c},{c}}
aux.GCheckAdditional=s.gcheck(c) aux.GCheckAdditional=s.gcheck(c)
local res=SNNM.SelectSubGroup(mg,tp,s.syngoal,Duel.IsSummonCancelable(),2,#mg,c,smat,tp,mgchk) local res=SNNM.SelectSubGroup(mg,tp,s.syngoal,Duel.IsSummonCancelable(),2,#mg,c,smat,tp,mgchk)
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
...@@ -327,13 +327,13 @@ function s.SynMixTarget(e,tp,eg,ep,ev,re,r,rp,chk,c) ...@@ -327,13 +327,13 @@ function s.SynMixTarget(e,tp,eg,ep,ev,re,r,rp,chk,c)
local mg local mg
local mgchk=false local mgchk=false
if mg1 then if mg1 then
mg=mg1:Filter(s.IsCanBeSynchroMaterial,nil,c) mg=mg1:Filter(s.SMatCheck,nil,c)
mgchk=true mgchk=true
else else
mg=s.GetSynMaterials(tp,c) mg=s.SMatCatch(tp,c)
end end
if smat~=nil then mg:AddCard(smat) end if smat~=nil then mg:AddCard(smat) end
SNNM.SubGroupParams={s.slfilter,s.GetSynchroLevel,nil,true,false,{c},{c}} SNNM.SubGroupParams={s.slfilter,s.SLevelCal,nil,true,false,{c},{c}}
aux.GCheckAdditional=s.gcheck(c) aux.GCheckAdditional=s.gcheck(c)
local sg=SNNM.SelectSubGroup(mg,tp,s.syngoal,Duel.IsSummonCancelable(),2,#mg,c,smat,tp,mgchk) local sg=SNNM.SelectSubGroup(mg,tp,s.syngoal,Duel.IsSummonCancelable(),2,#mg,c,smat,tp,mgchk)
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
...@@ -421,7 +421,7 @@ function s.initial_effect(c) ...@@ -421,7 +421,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.filter(c,tp) function s.filter(c,tp)
return c:IsType(TYPE_FIELD) and c:IsOriginalCodeRule(22702055) and c:GetActivateEffect():IsActivatable(tp,true,true) return c:IsType(TYPE_FIELD) and c:IsCode(53752003) and c:GetActivateEffect():IsActivatable(tp,true,true)
end end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
......
...@@ -20,7 +20,6 @@ function c60150607.initial_effect(c) ...@@ -20,7 +20,6 @@ function c60150607.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0) e1:SetHintTiming(0,0x1e0)
e1:SetCountLimit(1,60150607+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c60150607.target) e1:SetTarget(c60150607.target)
e1:SetOperation(c60150607.activate) e1:SetOperation(c60150607.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -75,7 +75,7 @@ function cm.activate2(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
end end
--set --set
function cm.setcon(e,tp,eg,ep,ev,re,r,rp) function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and aux.exccon(e) return ep~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and aux.exccon(e)
end end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end if chk==0 then return e:GetHandler():IsSSetable() end
......
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