Commit fe8a298c authored by wyykak's avatar wyykak

change newline

parent 7e27d97e
Arcol={} Arcol={}
function Arcol.GetLostCode(c) function Arcol.GetLostCode(c)
if c:GetOriginalCode()==22001 then if c:GetOriginalCode()==22001 then
return 22035 return 22035
elseif c:GetOriginalCode()==20026 then elseif c:GetOriginalCode()==20026 then
return 20044 return 20044
elseif c:IsOriginalSetCard(0x338) then elseif c:IsOriginalSetCard(0x338) then
return 999101 return 999101
elseif c:IsOriginalSetCard(0x300) then elseif c:IsOriginalSetCard(0x300) then
return 86379247 return 86379247
elseif c:IsOriginalSetCard(0xaa5) then elseif c:IsOriginalSetCard(0xaa5) then
return 86379744 return 86379744
else return false end else return false end
end end
\ No newline at end of file
Millux={} Millux={}
os=require('os') os=require('os')
table=require('table') table=require('table')
io=require('io') io=require('io')
function Millux.rabat_return(c,code,num) function Millux.rabat_return(c,code,num)
--return --return
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation e1:SetOperation
(function(e,tp,eg,ep,ev,re,r,rp) (function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(code,num)) e1:SetDescription(aux.Stringid(code,num))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCondition( e1:SetCondition(
function(e,tp,eg,ep,ev,re,r,rp) function(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsHasEffect(50008207) return not e:GetHandler():IsHasEffect(50008207)
end) end)
e1:SetTarget( e1:SetTarget(
function(e,tp,eg,ep,ev,re,r,rp,chk) function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end) end)
e1:SetOperation( e1:SetOperation(
function(e,tp,eg,ep,ev,re,r,rp) function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
end end
end) end)
e1:SetReset(RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(0) e2:SetProperty(0)
e2:SetCondition( e2:SetCondition(
function(e,tp,eg,ep,ev,re,r,rp) function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsHasEffect(50008207) return e:GetHandler():IsHasEffect(50008207)
end) end)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function Millux.return_con(e,tp,eg,ep,ev,re,r,rp) function Millux.return_con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function Millux.penlimit(c) function Millux.penlimit(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(Millux.splimit) e1:SetTarget(Millux.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function Millux.splimit(e,c,sump,sumtype,sumpos,targetp) function Millux.splimit(e,c,sump,sumtype,sumpos,targetp)
if c:IsRitualType(TYPE_RITUAL) then return false end if c:IsRitualType(TYPE_RITUAL) then return false end
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end end
Millux.loaded_metatable_list=Millux.loaded_metatable_list or {} Millux.loaded_metatable_list=Millux.loaded_metatable_list or {}
function Millux.LoadMetatable(code) function Millux.LoadMetatable(code)
local m1=_G["c"..code] local m1=_G["c"..code]
if m1 then return m1 end if m1 then return m1 end
local m2=Millux.loaded_metatable_list[code] local m2=Millux.loaded_metatable_list[code]
if m2 then return m2 end if m2 then return m2 end
_G["c"..code]={} _G["c"..code]={}
if pcall(function() dofile("expansions/script/c"..code..".lua") end) or pcall(function() dofile("script/c"..code..".lua") end) then if pcall(function() dofile("expansions/script/c"..code..".lua") end) or pcall(function() dofile("script/c"..code..".lua") end) then
local mt=_G["c"..code] local mt=_G["c"..code]
_G["c"..code]=nil _G["c"..code]=nil
if mt then if mt then
Millux.loaded_metatable_list[code]=mt Millux.loaded_metatable_list[code]=mt
return mt return mt
end end
else else
_G["c"..code]=nil _G["c"..code]=nil
end end
end end
function Millux.is_series(c,series,v,f,...) function Millux.is_series(c,series,v,f,...)
local codet=nil local codet=nil
if type(c)=="number" then if type(c)=="number" then
codet={c} codet={c}
elseif type(c)=="table" then elseif type(c)=="table" then
codet=c codet=c
elseif type(c)=="userdata" then elseif type(c)=="userdata" then
local f=f or Card.GetCode local f=f or Card.GetCode
codet={f(c)} codet={f(c)}
end end
local ncodet={...} local ncodet={...}
for i,code in pairs(codet) do for i,code in pairs(codet) do
for i,ncode in pairs(ncodet) do for i,ncode in pairs(ncodet) do
if code==ncode then return true end if code==ncode then return true end
end end
local mt=Millux.LoadMetatable(code) local mt=Millux.LoadMetatable(code)
if mt and mt["is_series_with_"..series] and (not v or mt["is_series_with_"..series]==v) then return true end if mt and mt["is_series_with_"..series] and (not v or mt["is_series_with_"..series]==v) then return true end
end end
return false return false
end end
function Millux.cannot_acctivate(c) function Millux.cannot_acctivate(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(aclimit) e1:SetValue(aclimit)
e1:SetCondition(actcon) e1:SetCondition(actcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function aclimit(e,re,tp) function aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e) return not re:GetHandler():IsImmuneToEffect(e)
end end
function actcon(e) function actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end end
return Millux return Millux
-- --
Afi={} Afi={}
--AFI --AFI
local AFI = false local AFI = false
EVENT_ADJ_LOC = 2000 EVENT_ADJ_LOC = 2000
EVENT_ADJ_ATK = 2001 EVENT_ADJ_ATK = 2001
EVENT_ADJ_DEF = 2002 EVENT_ADJ_DEF = 2002
EVENT_ADJ_LEV = 2003 EVENT_ADJ_LEV = 2003
EVENT_ADJ_RANK = 2004 EVENT_ADJ_RANK = 2004
EVENT_ADJ_RACE = 2005 EVENT_ADJ_RACE = 2005
EVENT_ADJ_ATTR = 2006 EVENT_ADJ_ATTR = 2006
EVENT_ADJ_DISABLE = 2007 EVENT_ADJ_DISABLE = 2007
local ms = {} local ms = {}
ms[0] = {} ms[0] = {}
ms[1] = {} ms[1] = {}
for i = 0, 6 do for i = 0, 6 do
ms[0][i] = {} ms[0][i] = {}
ms[1][i] = {} ms[1][i] = {}
end end
local lasts = {} local lasts = {}
function Afi.AdjustFieldInfoStore(c) function Afi.AdjustFieldInfoStore(c)
if AFI == true then return end if AFI == true then return end
AFI = true AFI = true
--store --store
local g=Group.CreateGroup() local g=Group.CreateGroup()
g:KeepAlive() g:KeepAlive()
--adjust --adjust
local e0 = Effect.CreateEffect(c) local e0 = Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetCode(EVENT_ADJUST) e0:SetCode(EVENT_ADJUST)
e0:SetOperation(Afi.AdjustFieldInfoCheck) e0:SetOperation(Afi.AdjustFieldInfoCheck)
e0:SetLabelObject(g) e0:SetLabelObject(g)
Duel.RegisterEffect(e0, 0) Duel.RegisterEffect(e0, 0)
end end
function Afi.AdjustFieldInfoCheck(e,tp,eg,ep,ev,re,r,rp) function Afi.AdjustFieldInfoCheck(e,tp,eg,ep,ev,re,r,rp)
--define --define
local g = Duel.GetMatchingGroup(aux.TRUE, tp, LOCATION_MZONE, LOCATION_MZONE, nil) local g = Duel.GetMatchingGroup(aux.TRUE, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
local preg = e:GetLabelObject() local preg = e:GetLabelObject()
if g:GetCount()>0 then if g:GetCount()>0 then
--check --check
Afi.AdjustFieldInfoCheckMI(g, preg, e) Afi.AdjustFieldInfoCheckMI(g, preg, e)
--renew --renew
preg:Clear() preg:Clear()
preg:Merge(g) preg:Merge(g)
Afi.AdjustFieldInfoRenewMI(g) Afi.AdjustFieldInfoRenewMI(g)
else else
if preg:GetCount()==0 then return end if preg:GetCount()==0 then return end
preg:Clear() preg:Clear()
end end
end end
function Afi.AdjustFieldInfoCheckMI(g, preg, e) function Afi.AdjustFieldInfoCheckMI(g, preg, e)
local n = -1 -- now seq local n = -1 -- now seq
local p = -1 -- now player local p = -1 -- now player
local pn = -1 -- pre seq local pn = -1 -- pre seq
local pp = -1 -- pre player local pp = -1 -- pre player
local tempg1 = {} -- up group(newVal > oldVal or cannot compare) local tempg1 = {} -- up group(newVal > oldVal or cannot compare)
local tempg2 = {} -- down group(newVal < oldVal) local tempg2 = {} -- down group(newVal < oldVal)
local isChange = not g:Equal(preg) local isChange = not g:Equal(preg)
for i = 0, 7 do for i = 0, 7 do
tempg1[i] = Group.CreateGroup() tempg1[i] = Group.CreateGroup()
tempg2[i] = Group.CreateGroup() tempg2[i] = Group.CreateGroup()
end end
local tempc = g:GetFirst() local tempc = g:GetFirst()
while(tempc) do while(tempc) do
p = tempc:GetControler() p = tempc:GetControler()
n = tempc:GetSequence() n = tempc:GetSequence()
if preg:IsContains(tempc) then if preg:IsContains(tempc) then
pp, pn = Afi.AdjustFieldInfoFindMI(tempc) pp, pn = Afi.AdjustFieldInfoFindMI(tempc)
if pp < 0 or pn < 0 or ms[pp][pn][-1] ~= tempc:GetFieldID() then if pp < 0 or pn < 0 or ms[pp][pn][-1] ~= tempc:GetFieldID() then
-- do nothing -- do nothing
else else
if n ~= pn and p == pp then if n ~= pn and p == pp then
Duel.RaiseSingleEvent(tempc, EVENT_ADJ_LOC, e, 0, 0, 0, pn) Duel.RaiseSingleEvent(tempc, EVENT_ADJ_LOC, e, 0, 0, 0, pn)
tempg1[0]:AddCard(tempc) tempg1[0]:AddCard(tempc)
end end
-- --
local attack = ms[pp][pn][1] local attack = ms[pp][pn][1]
if attack ~= tempc:GetAttack() then if attack ~= tempc:GetAttack() then
Duel.RaiseSingleEvent(tempc, EVENT_ADJ_ATK, e, 0, 0, 0, attack) Duel.RaiseSingleEvent(tempc, EVENT_ADJ_ATK, e, 0, 0, 0, attack)
if attack < tempc:GetAttack() then if attack < tempc:GetAttack() then
tempg1[1]:AddCard(tempc) tempg1[1]:AddCard(tempc)
else else
tempg2[1]:AddCard(tempc) tempg2[1]:AddCard(tempc)
end end
end end
-- --
local def = ms[pp][pn][2] local def = ms[pp][pn][2]
if def ~= tempc:GetDefense() then if def ~= tempc:GetDefense() then
Duel.RaiseSingleEvent(tempc, EVENT_ADJ_DEF, e, 0, 0, 0, def) Duel.RaiseSingleEvent(tempc, EVENT_ADJ_DEF, e, 0, 0, 0, def)
if def < tempc:GetDefense() then if def < tempc:GetDefense() then
tempg1[2]:AddCard(tempc) tempg1[2]:AddCard(tempc)
else else
tempg2[2]:AddCard(tempc) tempg2[2]:AddCard(tempc)
end end
end end
-- --
local lv = ms[pp][pn][3] local lv = ms[pp][pn][3]
if lv ~= tempc:GetLevel() then if lv ~= tempc:GetLevel() then
Duel.RaiseSingleEvent(tempc, EVENT_ADJ_LEV, e, 0, 0, 0, lv) Duel.RaiseSingleEvent(tempc, EVENT_ADJ_LEV, e, 0, 0, 0, lv)
if lv < tempc:GetLevel() then if lv < tempc:GetLevel() then
tempg1[3]:AddCard(tempc) tempg1[3]:AddCard(tempc)
else else
tempg2[3]:AddCard(tempc) tempg2[3]:AddCard(tempc)
end end
end end
-- --
local rank = ms[pp][pn][4] local rank = ms[pp][pn][4]
if rank ~= tempc:GetRank() then if rank ~= tempc:GetRank() then
Duel.RaiseSingleEvent(tempc, EVENT_ADJ_RANK, e, 0, 0, 0, rank) Duel.RaiseSingleEvent(tempc, EVENT_ADJ_RANK, e, 0, 0, 0, rank)
if rank < tempc:GetRank() then if rank < tempc:GetRank() then
tempg1[4]:AddCard(tempc) tempg1[4]:AddCard(tempc)
else else
tempg2[4]:AddCard(tempc) tempg2[4]:AddCard(tempc)
end end
end end
-- --
local race = ms[pp][pn][5] local race = ms[pp][pn][5]
if race ~= tempc:GetRace() then if race ~= tempc:GetRace() then
Duel.RaiseSingleEvent(tempc, EVENT_ADJ_RACE, e, 0, 0, 0, race) Duel.RaiseSingleEvent(tempc, EVENT_ADJ_RACE, e, 0, 0, 0, race)
tempg1[5]:AddCard(tempc) tempg1[5]:AddCard(tempc)
end end
-- --
local attr = ms[pp][pn][6] local attr = ms[pp][pn][6]
if attr ~= tempc:GetAttribute() then if attr ~= tempc:GetAttribute() then
Duel.RaiseSingleEvent(tempc, EVENT_ADJ_ATTR, e, 0, 0, 0, attr) Duel.RaiseSingleEvent(tempc, EVENT_ADJ_ATTR, e, 0, 0, 0, attr)
tempg1[6]:AddCard(tempc) tempg1[6]:AddCard(tempc)
end end
-- --
local disable = ms[pp][pn][7] local disable = ms[pp][pn][7]
if disable ~= tempc:IsDisabled() then if disable ~= tempc:IsDisabled() then
if tempc:IsDisabled() then if tempc:IsDisabled() then
Duel.RaiseSingleEvent(tempc, EVENT_ADJ_DISABLE, e, 0, 0, 0, 1) Duel.RaiseSingleEvent(tempc, EVENT_ADJ_DISABLE, e, 0, 0, 0, 1)
else else
Duel.RaiseSingleEvent(tempc, EVENT_ADJ_DISABLE, e, 0, 0, 0, 2) Duel.RaiseSingleEvent(tempc, EVENT_ADJ_DISABLE, e, 0, 0, 0, 2)
end end
if disable == false then if disable == false then
tempg1[7]:AddCard(tempc) tempg1[7]:AddCard(tempc)
else else
tempg2[7]:AddCard(tempc) tempg2[7]:AddCard(tempc)
end end
end end
end end
end end
tempc = g:GetNext() tempc = g:GetNext()
end end
for i = 0, 7 do for i = 0, 7 do
if tempg1[i]:GetCount() > 0 then if tempg1[i]:GetCount() > 0 then
Duel.RaiseEvent(tempg1[i], 2000+i, e, 0, 0, 0, 1) Duel.RaiseEvent(tempg1[i], 2000+i, e, 0, 0, 0, 1)
isChange = true isChange = true
end end
if tempg2[i]:GetCount() > 0 then if tempg2[i]:GetCount() > 0 then
Duel.RaiseEvent(tempg2[i], 2000+i, e, 0, 0, 0, 2) Duel.RaiseEvent(tempg2[i], 2000+i, e, 0, 0, 0, 2)
isChange = true isChange = true
end end
end end
if isChange then if isChange then
lasts = Nef.DeepCopy(ms) lasts = Nef.DeepCopy(ms)
end end
end end
function Afi.AdjustFieldInfoRenewMI(g) function Afi.AdjustFieldInfoRenewMI(g)
local n = -1 local n = -1
local p = -1 local p = -1
for i = 0, 6 do for i = 0, 6 do
ms[0][i][0] = nil ms[0][i][0] = nil
ms[1][i][0] = nil ms[1][i][0] = nil
end end
tempc = g:GetFirst() tempc = g:GetFirst()
while(tempc) do while(tempc) do
n = tempc:GetSequence() n = tempc:GetSequence()
p = tempc:GetControler() p = tempc:GetControler()
ms[p][n][0] = tempc ms[p][n][0] = tempc
ms[p][n][-1] = tempc:GetFieldID() ms[p][n][-1] = tempc:GetFieldID()
ms[p][n][1] = tempc:GetAttack() ms[p][n][1] = tempc:GetAttack()
ms[p][n][2] = tempc:GetDefense() ms[p][n][2] = tempc:GetDefense()
ms[p][n][3] = tempc:GetLevel() ms[p][n][3] = tempc:GetLevel()
ms[p][n][4] = tempc:GetRank() ms[p][n][4] = tempc:GetRank()
ms[p][n][5] = tempc:GetRace() ms[p][n][5] = tempc:GetRace()
ms[p][n][6] = tempc:GetAttribute() ms[p][n][6] = tempc:GetAttribute()
ms[p][n][7] = tempc:IsDisabled() ms[p][n][7] = tempc:IsDisabled()
tempc = g:GetNext() tempc = g:GetNext()
end end
end end
function Afi.AdjustFieldInfoFindMI(c) function Afi.AdjustFieldInfoFindMI(c)
local i, j local i, j
for i = 0, 1 do for i = 0, 1 do
for j = 0, 6 do for j = 0, 6 do
if ms[i][j][0] == c then return i, j end if ms[i][j][0] == c then return i, j end
end end
end end
return -1, -1 return -1, -1
end end
function Afi.AFIFindLastMI(c) function Afi.AFIFindLastMI(c)
local i, j local i, j
for i = 0, 1 do for i = 0, 1 do
for j = 0, 6 do for j = 0, 6 do
if lasts[i][j][0] == c then return i, j end if lasts[i][j][0] == c then return i, j end
end end
end end
return -1, -1 return -1, -1
end end
\ No newline at end of file
CardList = CardList or {} CardList = CardList or {}
CardList.Main={ CardList.Main={
10000, 10000,
10001, 10001,
10002, 10002,
10007, 10007,
10010, 10010,
10011, 10011,
-- 10013, -- 10013,
10014, 10014,
10015, 10015,
-- 10016, -- 10016,
10018, 10018,
10020, 10020,
10027, 10027,
10051, 10051,
10054, 10054,
10057, 10057,
10060, 10060,
10067, 10067,
10068, 10068,
10069, 10069,
10071, 10071,
10072, 10072,
10073, 10073,
10074, 10074,
10086, 10086,
10087, 10087,
10089, 10089,
10099, 10099,
10100, 10100,
10101, 10101,
10102, 10102,
10113, 10113,
10114, 10114,
10115, 10115,
10116, 10116,
10204, 10204,
10207, 10207,
10222, 10222,
10246, 10246,
10255, 10255,
10256, 10256,
10258, 10258,
10260, 10260,
10262, 10262,
10270, 10270,
10271, 10271,
10273, 10273,
10275, 10275,
10276, 10276,
10278, 10278,
10281, 10281,
10282, 10282,
10283, 10283,
10285, 10285,
10286, 10286,
10289, 10289,
10304, 10304,
10307, 10307,
10322, 10322,
10330, 10330,
10333, 10333,
10335, 10335,
10356, 10356,
10358, 10358,
10361, 10361,
10362, 10362,
10363, 10363,
10364, 10364,
10365, 10365,
10366, 10366,
10368, 10368,
10369, 10369,
10370, 10370,
10371, 10371,
10372, 10372,
10373, 10373,
10374, 10374,
10375, 10375,
10376, 10376,
10377, 10377,
10380, 10380,
10381, 10381,
10382, 10382,
10383, 10383,
10386, 10386,
11001, 11001,
11004, 11004,
11007, 11007,
11010, 11010,
11011, 11011,
11036, 11036,
11038, 11038,
12001, 12001,
12002, 12002,
12004, 12004,
12006, 12006,
12012, 12012,
12014, 12014,
12016, 12016,
12020, 12020,
13001, 13001,
13005, 13005,
13006, 13006,
13009, 13009,
13014, 13014,
13016, 13016,
13021, 13021,
13031, 13031,
13033, 13033,
13035, 13035,
13039, 13039,
13040, 13040,
13041, 13041,
13044, 13044,
13047, 13047,
13049, 13049,
13051, 13051,
13052, 13052,
13053, 13053,
13054, 13054,
13055, 13055,
13056, 13056,
13057, 13057,
13058, 13058,
13059, 13059,
13060, 13060,
13068, 13068,
13069, 13069,
13070, 13070,
13072, 13072,
13075, 13075,
13078, 13078,
13080, 13080,
13083, 13083,
13084, 13084,
13085, 13085,
14001, 14001,
14003, 14003,
14007, 14007,
14010, 14010,
14013, 14013,
14021, 14021,
14022, 14022,
14023, 14023,
14026, 14026,
14028, 14028,
14029, 14029,
14030, 14030,
14033, 14033,
14034, 14034,
14035, 14035,
14036, 14036,
14037, 14037,
14038, 14038,
14039, 14039,
14041, 14041,
14042, 14042,
14044, 14044,
14046, 14046,
14051, 14051,
14052, 14052,
14053, 14053,
14055, 14055,
14056, 14056,
14058, 14058,
14061, 14061,
14062, 14062,
14075, 14075,
15001, 15001,
15004, 15004,
15007, 15007,
15010, 15010,
15013, 15013,
15016, 15016,
15019, 15019,
15020, 15020,
15024, 15024,
15025, 15025,
15026, 15026,
15029, 15029,
15030, 15030,
15032, 15032,
15037, 15037,
15038, 15038,
15039, 15039,
15040, 15040,
15041, 15041,
15043, 15043,
15045, 15045,
15046, 15046,
-- 15050, -- 15050,
15055, 15055,
15056, 15056,
15057, 15057,
15062, 15062,
15063, 15063,
15064, 15064,
15065, 15065,
15066, 15066,
15067, 15067,
15068, 15068,
15069, 15069,
15077, 15077,
15080, 15080,
15099, 15099,
19001, 19001,
19002, 19002,
19003, 19003,
19005, 19005,
19032, 19032,
20001, 20001,
20003, 20003,
20004, 20004,
20007, 20007,
20018, 20018,
20020, 20020,
20022, 20022,
20025, 20025,
20026, 20026,
20027, 20027,
20031, 20031,
20032, 20032,
20044, 20044,
20048, 20048,
20049, 20049,
20050, 20050,
20052, 20052,
20053, 20053,
20054, 20054,
20055, 20055,
20056, 20056,
20057, 20057,
20058, 20058,
20059, 20059,
20068, 20068,
20069, 20069,
20070, 20070,
20071, 20071,
20073, 20073,
20075, 20075,
20076, 20076,
20078, 20078,
20080, 20080,
20083, 20083,
20084, 20084,
20085, 20085,
20086, 20086,
20088, 20088,
20090, 20090,
20091, 20091,
20092, 20092,
20093, 20093,
20094, 20094,
20095, 20095,
20096, 20096,
20097, 20097,
20098, 20098,
20099, 20099,
20101, 20101,
20104, 20104,
20107, 20107,
20110, 20110,
20114, 20114,
20115, 20115,
20116, 20116,
20117, 20117,
20118, 20118,
20119, 20119,
20120, 20120,
20123, 20123,
20128, 20128,
20135, 20135,
20136, 20136,
20140, 20140,
20142, 20142,
20144, 20144,
20146, 20146,
20148, 20148,
20149, 20149,
20150, 20150,
20151, 20151,
20153, 20153,
20155, 20155,
20156, 20156,
20157, 20157,
20158, 20158,
20159, 20159,
20160, 20160,
20161, 20161,
20162, 20162,
20163, 20163,
20166, 20166,
20168, 20168,
20170, 20170,
20171, 20171,
20172, 20172,
20173, 20173,
20174, 20174,
20175, 20175,
20176, 20176,
20177, 20177,
20178, 20178,
20179, 20179,
20181, 20181,
20184, 20184,
20187, 20187,
20188, 20188,
20190, 20190,
20191, 20191,
20192, 20192,
20193, 20193,
20194, 20194,
20195, 20195,
20196, 20196,
20197, 20197,
20198, 20198,
20199, 20199,
20200, 20200,
20201, 20201,
20202, 20202,
20203, 20203,
20204, 20204,
20205, 20205,
20206, 20206,
20207, 20207,
20208, 20208,
20209, 20209,
20210, 20210,
20211, 20211,
20212, 20212,
20214, 20214,
20216, 20216,
20217, 20217,
20218, 20218,
20219, 20219,
20220, 20220,
20223, 20223,
20224, 20224,
20225, 20225,
20226, 20226,
20227, 20227,
20228, 20228,
20235, 20235,
20236, 20236,
20237, 20237,
20238, 20238,
20239, 20239,
20240, 20240,
20241, 20241,
20248, 20248,
20252, 20252,
20254, 20254,
20255, 20255,
20256, 20256,
20257, 20257,
20258, 20258,
20259, 20259,
20261, 20261,
20263, 20263,
20265, 20265,
20267, 20267,
20269, 20269,
20290, 20290,
20299, 20299,
-- 20300, -- 20300,
20301, 20301,
20302, 20302,
21001, 21001,
21003, 21003,
21005, 21005,
21006, 21006,
21009, 21009,
21012, 21012,
21013, 21013,
21014, 21014,
21027, 21027,
21028, 21028,
21029, 21029,
21031, 21031,
21033, 21033,
21034, 21034,
21036, 21036,
21039, 21039,
21041, 21041,
21042, 21042,
21043, 21043,
21044, 21044,
21045, 21045,
21046, 21046,
21047, 21047,
21048, 21048,
21049, 21049,
21050, 21050,
21051, 21051,
21052, 21052,
21053, 21053,
21054, 21054,
21055, 21055,
21056, 21056,
21057, 21057,
21058, 21058,
21069, 21069,
21071, 21071,
21074, 21074,
21077, 21077,
21080, 21080,
21083, 21083,
21085, 21085,
21091, 21091,
21094, 21094,
21099, 21099,
21100, 21100,
21101, 21101,
21102, 21102,
21103, 21103,
21105, 21105,
21109, 21109,
21113, 21113,
21119, 21119,
21120, 21120,
21121, 21121,
21122, 21122,
21123, 21123,
21124, 21124,
21125, 21125,
21126, 21126,
21127, 21127,
21128, 21128,
21129, 21129,
21130, 21130,
21131, 21131,
21133, 21133,
21136, 21136,
21139, 21139,
21145, 21145,
21146, 21146,
21147, 21147,
21153, 21153,
21154, 21154,
21160, 21160,
21164, 21164,
21200, 21200,
22001, 22001,
22002, 22002,
22004, 22004,
22005, 22005,
22008, 22008,
22009, 22009,
22011, 22011,
22012, 22012,
22014, 22014,
22015, 22015,
22017, 22017,
22018, 22018,
22020, 22020,
22021, 22021,
22033, 22033,
22035, 22035,
22056, 22056,
22057, 22057,
22060, 22060,
22061, 22061,
22064, 22064,
22066, 22066,
22075, 22075,
22076, 22076,
22077, 22077,
22084, 22084,
22085, 22085,
22086, 22086,
22087, 22087,
22088, 22088,
22089, 22089,
22090, 22090,
22093, 22093,
22100, 22100,
22103, 22103,
22104, 22104,
22105, 22105,
22106, 22106,
22107, 22107,
22108, 22108,
22109, 22109,
22110, 22110,
22111, 22111,
22112, 22112,
22113, 22113,
22114, 22114,
22115, 22115,
22116, 22116,
22117, 22117,
22118, 22118,
22120, 22120,
22121, 22121,
22122, 22122,
22123, 22123,
22124, 22124,
22127, 22127,
22130, 22130,
22131, 22131,
22132, 22132,
22133, 22133,
22134, 22134,
22135, 22135,
22161, 22161,
22162, 22162,
22191, 22191,
22200, 22200,
22201, 22201,
22202, 22202,
22204, 22204,
22205, 22205,
22206, 22206,
22207, 22207,
22211, 22211,
22212, 22212,
22215, 22215,
22216, 22216,
22218, 22218,
22221, 22221,
22222, 22222,
22223, 22223,
22225, 22225,
22249, 22249,
22250, 22250,
22251, 22251,
22252, 22252,
22255, 22255,
22299, 22299,
22300, 22300,
22301, 22301,
22400, 22400,
22661, 22661,
22662, 22662,
22666, 22666,
23001, 23001,
23004, 23004,
23007, 23007,
23010, 23010,
23013, 23013,
23016, 23016,
23019, 23019,
23020, 23020,
23021, 23021,
23028, 23028,
23034, 23034,
23035, 23035,
23036, 23036,
23037, 23037,
23038, 23038,
23039, 23039,
23040, 23040,
23041, 23041,
23042, 23042,
23045, 23045,
23046, 23046,
23047, 23047,
23050, 23050,
23051, 23051,
23052, 23052,
23053, 23053,
23056, 23056,
23057, 23057,
23058, 23058,
23059, 23059,
23060, 23060,
23073, 23073,
23076, 23076,
23080, 23080,
23081, 23081,
23082, 23082,
23083, 23083,
23086, 23086,
23087, 23087,
23090, 23090,
23093, 23093,
23096, 23096,
23099, 23099,
23101, 23101,
23107, 23107,
23120, 23120,
23123, 23123,
23137, 23137,
23138, 23138,
23139, 23139,
23140, 23140,
23143, 23143,
23144, 23144,
23145, 23145,
23146, 23146,
23156, 23156,
23168, 23168,
23175, 23175,
23178, 23178,
23179, 23179,
23185, 23185,
23188, 23188,
23191, 23191,
23194, 23194,
23197, 23197,
23200, 23200,
23201, 23201,
23202, 23202,
23203, 23203,
23204, 23204,
23205, 23205,
23206, 23206,
23210, 23210,
23230, 23230,
23234, 23234,
23235, 23235,
23236, 23236,
23237, 23237,
23238, 23238,
23240, 23240,
23241, 23241,
23242, 23242,
23249, 23249,
23252, 23252,
23253, 23253,
23254, 23254,
23257, 23257,
23300, 23300,
24001, 24001,
24002, 24002,
24004, 24004,
24005, 24005,
24007, 24007,
24008, 24008,
24010, 24010,
24011, 24011,
24016, 24016,
24017, 24017,
24018, 24018,
24019, 24019,
24020, 24020,
24025, 24025,
24031, 24031,
24033, 24033,
24034, 24034,
24035, 24035,
24036, 24036,
24037, 24037,
24038, 24038,
24039, 24039,
24040, 24040,
24041, 24041,
24042, 24042,
24043, 24043,
24044, 24044,
24045, 24045,
24047, 24047,
24049, 24049,
24051, 24051,
24053, 24053,
24054, 24054,
24055, 24055,
24057, 24057,
24059, 24059,
24061, 24061,
24062, 24062,
24065, 24065,
24074, 24074,
24077, 24077,
24078, 24078,
24079, 24079,
24083, 24083,
24086, 24086,
24088, 24088,
24091, 24091,
24094, 24094,
24099, 24099,
24104, 24104,
24105, 24105,
24106, 24106,
24107, 24107,
24108, 24108,
24111, 24111,
24115, 24115,
24116, 24116,
24117, 24117,
24121, 24121,
24123, 24123,
24135, 24135,
24136, 24136,
24137, 24137,
24138, 24138,
24142, 24142,
24145, 24145,
24148, 24148,
24151, 24151,
24152, 24152,
24153, 24153,
24161, 24161,
24162, 24162,
24235, 24235,
24240, 24240,
25020, 25020,
25021, 25021,
25022, 25022,
25029, 25029,
25030, 25030,
25031, 25031,
25032, 25032,
25040, 25040,
25041, 25041,
25043, 25043,
25044, 25044,
25046, 25046,
25048, 25048,
25049, 25049,
25050, 25050,
25051, 25051,
25053, 25053,
25056, 25056,
25059, 25059,
25060, 25060,
25061, 25061,
25064, 25064,
25067, 25067,
25068, 25068,
25069, 25069,
25070, 25070,
25071, 25071,
25072, 25072,
25073, 25073,
25074, 25074,
25075, 25075,
25081, 25081,
25082, 25082,
25083, 25083,
25084, 25084,
25085, 25085,
25091, 25091,
25093, 25093,
25095, 25095,
25096, 25096,
25098, 25098,
25099, 25099,
25101, 25101,
25102, 25102,
25103, 25103,
25104, 25104,
25105, 25105,
25106, 25106,
25107, 25107,
25108, 25108,
25115, 25115,
25116, 25116,
25117, 25117,
25118, 25118,
25119, 25119,
25122, 25122,
25127, 25127,
25128, 25128,
25129, 25129,
25130, 25130,
25131, 25131,
25133, 25133,
25138, 25138,
25139, 25139,
25144, 25144,
25147, 25147,
25150, 25150,
25151, 25151,
25152, 25152,
25153, 25153,
25154, 25154,
25155, 25155,
25164, 25164,
25167, 25167,
25175, 25175,
25176, 25176,
25301, 25301,
25304, 25304,
25307, 25307,
25310, 25310,
25313, 25313,
25316, 25316,
25319, 25319,
25322, 25322,
25325, 25325,
25328, 25328,
25331, 25331,
25334, 25334,
25337, 25337,
25343, 25343,
25346, 25346,
25349, 25349,
25350, 25350,
25351, 25351,
25352, 25352,
25353, 25353,
26001, 26001,
26004, 26004,
26007, 26007,
26009, 26009,
26011, 26011,
26012, 26012,
26013, 26013,
26014, 26014,
26049, 26049,
26050, 26050,
26051, 26051,
26052, 26052,
26053, 26053,
26054, 26054,
26055, 26055,
26056, 26056,
26057, 26057,
26058, 26058,
26059, 26059,
26060, 26060,
26061, 26061,
26062, 26062,
26063, 26063,
26064, 26064,
26065, 26065,
26066, 26066,
26067, 26067,
26068, 26068,
26069, 26069,
26070, 26070,
26071, 26071,
26075, 26075,
26076, 26076,
26077, 26077,
26081, 26081,
26082, 26082,
26084, 26084,
26085, 26085,
26086, 26086,
26087, 26087,
26088, 26088,
26091, 26091,
26092, 26092,
26093, 26093,
26100, 26100,
26103, 26103,
26106, 26106,
26108, 26108,
26110, 26110,
26113, 26113,
26116, 26116,
26119, 26119,
26122, 26122,
26125, 26125,
26126, 26126,
26135, 26135,
26136, 26136,
26137, 26137,
26138, 26138,
26139, 26139,
26140, 26140,
-- 26142, -- 26142,
26143, 26143,
26144, 26144,
26145, 26145,
26150, 26150,
26185, 26185,
26186, 26186,
27001, 27001,
27002, 27002,
27004, 27004,
27005, 27005,
27007, 27007,
27008, 27008,
27010, 27010,
27011, 27011,
27013, 27013,
27014, 27014,
27016, 27016,
27017, 27017,
27021, 27021,
27022, 27022,
27023, 27023,
27024, 27024,
27025, 27025,
27026, 27026,
27027, 27027,
27028, 27028,
27029, 27029,
27030, 27030,
27033, 27033,
27036, 27036,
27041, 27041,
27042, 27042,
27043, 27043,
27046, 27046,
27052, 27052,
27061, 27061,
27062, 27062,
27063, 27063,
27064, 27064,
27067, 27067,
27071, 27071,
27073, 27073,
27076, 27076,
27079, 27079,
27088, 27088,
27089, 27089,
27092, 27092,
27093, 27093,
27096, 27096,
27097, 27097,
27098, 27098,
27099, 27099,
27101, 27101,
27106, 27106,
27107, 27107,
27108, 27108,
27109, 27109,
27110, 27110,
27111, 27111,
27113, 27113,
27115, 27115,
27119, 27119,
27122, 27122,
27125, 27125,
27127, 27127,
27130, 27130,
27133, 27133,
27136, 27136,
27139, 27139,
27145, 27145,
27146, 27146,
27147, 27147,
27148, 27148,
28001, 28001,
28002, 28002,
28003, 28003,
28006, 28006,
28007, 28007,
28008, 28008,
28011, 28011,
28012, 28012,
28016, 28016,
28017, 28017,
28022, 28022,
28025, 28025,
28035, 28035,
28036, 28036,
28037, 28037,
28039, 28039,
28041, 28041,
28044, 28044,
28050, 28050,
28064, 28064,
29001, 29001,
29003, 29003,
29006, 29006,
29009, 29009,
29012, 29012,
29014, 29014,
29016, 29016,
29019, 29019,
29030, 29030,
29035, 29035,
29036, 29036,
29037, 29037,
29038, 29038,
29039, 29039,
29040, 29040,
29041, 29041,
29042, 29042,
29043, 29043,
29044, 29044,
29084, 29084,
31001, 31001,
31004, 31004,
31007, 31007,
31010, 31010,
31011, 31011,
31013, 31013,
31018, 31018,
31021, 31021,
31051, 31051,
31052, 31052,
31053, 31053,
31054, 31054,
31055, 31055,
31063, 31063,
32001, 32001,
32004, 32004,
32007, 32007,
32009, 32009,
32012, 32012,
32015, 32015,
32018, 32018,
32020, 32020,
32022, 32022,
32035, 32035,
32039, 32039,
32042, 32042,
32045, 32045,
32047, 32047,
40001, 40001,
40003, 40003,
40006, 40006,
40009, 40009,
40012, 40012,
40016, 40016,
40019, 40019,
40022, 40022,
40025, 40025,
40028, 40028,
40030, 40030,
40031, 40031,
40032, 40032,
40033, 40033,
40034, 40034,
40035, 40035,
40036, 40036,
40037, 40037,
40039, 40039,
51105, 51105,
51106, 51106,
51107, 51107,
51108, 51108,
51109, 51109,
51110, 51110,
51111, 51111,
51112, 51112,
51201, 51201,
51203, 51203,
51204, 51204,
51205, 51205,
51206, 51206,
51207, 51207,
60001, 60001,
60005, 60005,
60010, 60010,
60015, 60015,
60020, 60020,
60024, 60024,
60026, 60026,
60029, 60029,
60033, 60033,
60038, 60038,
60040, 60040,
60042, 60042,
60081, 60081,
60082, 60082,
60083, 60083,
60084, 60084,
60085, 60085,
60087, 60087,
60088, 60088,
60090, 60090,
60091, 60091,
60105, 60105,
60203, 60203,
60218, 60218,
60404, 60404,
60419, 60419,
60505, 60505,
60520, 60520,
60605, 60605,
60707, 60707,
60722, 60722,
60806, 60806,
60822, 60822,
61007, 61007,
61023, 61023,
61107, 61107,
61122, 61122,
61207, 61207,
64010, 64010,
70001, 70001,
70007, 70007,
70013, 70013,
70019, 70019,
70023, 70023,
70027, 70027,
70030, 70030,
70036, 70036,
70042, 70042,
70047, 70047,
70052, 70052,
70053, 70053,
70054, 70054,
70055, 70055,
70060, 70060,
70061, 70061,
70062, 70062,
70063, 70063,
70064, 70064,
70065, 70065,
70066, 70066,
70081, 70081,
70082, 70082,
70083, 70083,
70084, 70084,
70091, 70091,
70093, 70093,
70094, 70094,
71101, 71101,
71102, 71102,
71103, 71103,
71104, 71104,
71105, 71105,
71106, 71106,
71107, 71107,
71108, 71108,
71201, 71201,
71202, 71202,
71204, 71204,
71205, 71205,
71207, 71207,
71208, 71208,
82430, 82430,
82431, 82431,
82432, 82432,
82434, 82434,
82435, 82435,
91211, 91211,
200001, 200001,
200002, 200002,
200003, 200003,
200004, 200004,
200005, 200005,
200006, 200006,
200009, 200009,
200010, 200010,
200012, 200012,
200013, 200013,
200014, 200014,
200015, 200015,
200016, 200016,
200017, 200017,
200018, 200018,
200019, 200019,
200020, 200020,
200021, 200021,
200201, 200201,
200202, 200202,
200203, 200203,
200204, 200204,
200205, 200205,
200206, 200206,
200207, 200207,
200208, 200208,
200209, 200209,
200210, 200210,
200211, 200211,
200212, 200212,
200213, 200213,
200214, 200214,
200215, 200215,
200216, 200216,
200217, 200217,
200218, 200218,
200219, 200219,
200220, 200220,
200221, 200221,
200301, 200301,
200302, 200302,
200304, 200304,
200305, 200305,
210001, 210001,
210002, 210002,
210003, 210003,
210004, 210004,
210005, 210005,
210006, 210006,
210007, 210007,
210011, 210011,
210012, 210012,
210013, 210013,
210014, 210014,
210015, 210015,
210016, 210016,
210017, 210017,
210018, 210018,
210019, 210019,
210020, 210020,
210021, 210021,
401103, 401103,
401104, 401104,
401105, 401105,
401106, 401106,
401107, 401107,
401108, 401108,
401109, 401109,
401110, 401110,
401203, 401203,
401205, 401205,
401206, 401206,
401207, 401207,
401208, 401208,
401401, 401401,
401402, 401402,
401403, 401403,
401404, 401404,
401405, 401405,
401421, 401421,
421401, 421401,
421402, 421402,
421403, 421403,
421404, 421404,
421405, 421405,
421406, 421406,
421407, 421407,
421408, 421408,
912104, 912104,
999004, 999004,
999006, 999006,
999007, 999007,
999010, 999010,
999011, 999011,
999101, 999101,
999102, 999102,
999103, 999103,
999104, 999104,
999105, 999105,
999106, 999106,
999107, 999107,
999108, 999108,
999109, 999109,
999110, 999110,
999201, 999201,
999202, 999202,
999203, 999203,
999204, 999204,
999205, 999205,
999207, 999207,
999210, 999210,
999211, 999211,
999212, 999212,
999214, 999214,
999215, 999215,
999301, 999301,
999302, 999302,
999305, 999305,
999306, 999306,
999307, 999307,
999308, 999308,
999309, 999309,
999310, 999310,
999401, 999401,
999402, 999402,
999403, 999403,
999404, 999404,
999405, 999405,
999406, 999406,
999407, 999407,
999408, 999408,
999410, 999410,
999411, 999411,
999501, 999501,
999505, 999505,
999506, 999506,
999509, 999509,
999510, 999510,
999511, 999511,
999512, 999512,
999514, 999514,
999515, 999515,
999516, 999516,
999517, 999517,
999601, 999601,
999602, 999602,
999603, 999603,
999604, 999604,
999605, 999605,
999606, 999606,
999701, 999701,
999703, 999703,
999705, 999705,
999710, 999710,
999711, 999711,
999712, 999712,
999713, 999713,
999714, 999714,
999715, 999715,
999716, 999716,
999717, 999717,
999901, 999901,
999902, 999902,
999903, 999903,
999904, 999904,
999905, 999905,
999906, 999906,
999907, 999907,
999908, 999908,
999909, 999909,
999910, 999910,
999911, 999911,
999912, 999912,
999913, 999913,
999918, 999918,
999920, 999920,
1153201, 1153201,
1153211, 1153211,
1153301, 1153301,
1153602, 1153602,
1153607, 1153607,
1158001, 1158001,
1192020, 1192020,
1199001, 1199001,
4031101, 4031101,
4031102, 4031102,
4031103, 4031103,
4031104, 4031104,
4031105, 4031105,
4031106, 4031106,
4031201, 4031201,
7001000, 7001000,
7001001, 7001001,
7001100, 7001100,
7001101, 7001101,
7001102, 7001102,
7001103, 7001103,
7001104, 7001104,
7001200, 7001200,
7001201, 7001201,
7770005, 7770005,
7770006, 7770006,
7770007, 7770007,
7770017, 7770017,
7770018, 7770018,
7770020, 7770020,
7770021, 7770021,
7770025, 7770025,
7770057, 7770057,
7770063, 7770063,
7770069, 7770069,
7770072, 7770072,
7770075, 7770075,
7770081, 7770081,
7770093, 7770093,
7770102, 7770102,
7770108, 7770108,
7770114, 7770114,
7770133, 7770133,
7770187, 7770187,
7770196, 7770196,
10000000, 10000000,
10000001, 10000001,
13000000, 13000000,
13000003, 13000003,
13000006, 13000006,
13000009, 13000009,
13000012, 13000012,
13000015, 13000015,
13001000, 13001000,
13001015, 13001015,
13001018, 13001018,
13001021, 13001021,
13001024, 13001024,
13001027, 13001027,
13001030, 13001030,
13001033, 13001033,
13001036, 13001036,
13002000, 13002000,
13002003, 13002003,
13002018, 13002018,
13940000, 13940000,
13940001, 13940001,
13940003, 13940003,
13940004, 13940004,
13940006, 13940006,
13940007, 13940007,
13940008, 13940008,
13940009, 13940009,
13940010, 13940010,
-- 14000021, -- 14000021,
-- 14000022, -- 14000022,
-- 14000023, -- 14000023,
-- 14000024, -- 14000024,
-- 14000025, -- 14000025,
-- 14000027, -- 14000027,
-- 14000028, -- 14000028,
-- 14000029, -- 14000029,
-- 14000030, -- 14000030,
-- 14000032, -- 14000032,
-- 14000033, -- 14000033,
-- 14000036, -- 14000036,
-- 14000037, -- 14000037,
14000055, 14000055,
14000056, 14000056,
14000057, 14000057,
14000058, 14000058,
14000059, 14000059,
14000066, 14000066,
14000067, 14000067,
14000068, 14000068,
-- 14000145, -- 14000145,
-- 14000146, -- 14000146,
-- 14000147, -- 14000147,
-- 14000148, -- 14000148,
-- 14000149, -- 14000149,
-- 14000150, -- 14000150,
-- 14000151, -- 14000151,
-- 14000152, -- 14000152,
-- 14000153, -- 14000153,
14000260, 14000260,
14000262, 14000262,
14000267, 14000267,
14000268, 14000268,
14000269, 14000269,
14000270, 14000270,
14000272, 14000272,
14000273, 14000273,
14000274, 14000274,
14000275, 14000275,
14000276, 14000276,
14000277, 14000277,
14000284, 14000284,
-- 14000351, -- 14000351,
-- 14000352, -- 14000352,
-- 14000353, -- 14000353,
-- 14000354, -- 14000354,
-- 14000355, -- 14000355,
-- 14000356, -- 14000356,
-- 14000357, -- 14000357,
-- 14000358, -- 14000358,
-- 14000359, -- 14000359,
-- 14000360, -- 14000360,
-- 14000361, -- 14000361,
-- 14000362, -- 14000362,
-- 14000363, -- 14000363,
-- 14000364, -- 14000364,
-- 14000365, -- 14000365,
-- 14000366, -- 14000366,
-- 14000367, -- 14000367,
-- 14000368, -- 14000368,
14000531, 14000531,
14000532, 14000532,
14000533, 14000533,
14000534, 14000534,
14000535, 14000535,
14000536, 14000536,
14000537, 14000537,
14000556, 14000556,
14000557, 14000557,
14000558, 14000558,
14000559, 14000559,
14000560, 14000560,
14000561, 14000561,
14000562, 14000562,
14000563, 14000563,
14050011, 14050011,
14050012, 14050012,
14050013, 14050013,
14050014, 14050014,
14050015, 14050015,
14050016, 14050016,
14050017, 14050017,
14050018, 14050018,
14050019, 14050019,
14050020, 14050020,
14090016, 14090016,
14090017, 14090017,
14090018, 14090018,
14090019, 14090019,
14090020, 14090020,
14090021, 14090021,
14090025, 14090025,
14090026, 14090026,
14090027, 14090027,
14090030, 14090030,
15511551, 15511551,
15511554, 15511554,
15511557, 15511557,
15511560, 15511560,
15511563, 15511563,
15511566, 15511566,
16000002, 16000002,
16000006, 16000006,
16000007, 16000007,
16000009, 16000009,
16001001, 16001001,
16001101, 16001101,
16001102, 16001102,
16001104, 16001104,
16002001, 16002001,
16010002, 16010002,
16010003, 16010003,
16011201, 16011201,
16011202, 16011202,
16011501, 16011501,
16030000, 16030000,
16030001, 16030001,
16030002, 16030002,
16030003, 16030003,
16030004, 16030004,
16031201, 16031201,
16032001, 16032001,
16040000, 16040000,
16040001, 16040001,
16041001, 16041001,
16041002, 16041002,
16041201, 16041201,
16041301, 16041301,
16041501, 16041501,
16061002, 16061002,
16061201, 16061201,
16061501, 16061501,
17029010, 17029010,
17029230, 17029230,
17030010, 17030010,
17030020, 17030020,
17030030, 17030030,
17030040, 17030040,
17030050, 17030050,
17030060, 17030060,
17030070, 17030070,
17030080, 17030080,
17030090, 17030090,
17030100, 17030100,
17030120, 17030120,
17030160, 17030160,
17030170, 17030170,
17030180, 17030180,
17030190, 17030190,
17030210, 17030210,
17030220, 17030220,
17030600, 17030600,
17030601, 17030601,
17033000, 17033000,
17035010, 17035010,
17035020, 17035020,
17035021, 17035021,
17035022, 17035022,
17035023, 17035023,
17035030, 17035030,
17035040, 17035040,
17035200, 17035200,
17035210, 17035210,
17035220, 17035220,
17035230, 17035230,
17035250, 17035250,
17035410, 17035410,
17035411, 17035411,
17035420, 17035420,
17035430, 17035430,
17035440, 17035440,
17035450, 17035450,
17035460, 17035460,
17035461, 17035461,
17045007, 17045007,
17050904, 17050904,
17050931, 17050931,
17052929, 17052929,
17052930, 17052930,
17052931, 17052931,
17052932, 17052932,
17052933, 17052933,
17052935, 17052935,
17052938, 17052938,
17060810, 17060810,
17060820, 17060820,
17060830, 17060830,
17060840, 17060840,
17060850, 17060850,
17060860, 17060860,
17060870, 17060870,
17060880, 17060880,
17060945, 17060945,
17061030, 17061030,
17061080, 17061080,
17061120, 17061120,
17061121, 17061121,
17061160, 17061160,
17061210, 17061210,
17061220, 17061220,
17061610, 17061610,
17061620, 17061620,
17061630, 17061630,
19114515, 19114515,
19114517, 19114517,
19114520, 19114520,
19114521, 19114521,
19114522, 19114522,
19214520, 19214520,
19214524, 19214524,
19214530, 19214530,
19214535, 19214535,
19214538, 19214538,
19214543, 19214543,
21470001, 21470001,
21470002, 21470002,
21470003, 21470003,
21470004, 21470004,
21470005, 21470005,
21470006, 21470006,
21470007, 21470007,
21470008, 21470008,
21470009, 21470009,
21470010, 21470010,
21470011, 21470011,
21470012, 21470012,
21470013, 21470013,
21470017, 21470017,
21470018, 21470018,
21470019, 21470019,
21470020, 21470020,
21470022, 21470022,
21470023, 21470023,
21470101, 21470101,
21470102, 21470102,
21470103, 21470103,
22200001, 22200001,
22200002, 22200002,
22200003, 22200003,
22201001, 22201001,
22201002, 22201002,
22201003, 22201003,
22201004, 22201004,
22201007, 22201007,
22201008, 22201008,
22201101, 22201101,
22201102, 22201102,
22201103, 22201103,
22201104, 22201104,
22201105, 22201105,
22202001, 22202001,
22202002, 22202002,
22202003, 22202003,
22202004, 22202004,
22202005, 22202005,
22202007, 22202007,
22202008, 22202008,
22202009, 22202009,
22202010, 22202010,
22202101, 22202101,
22202102, 22202102,
22202103, 22202103,
22202201, 22202201,
22202202, 22202202,
-- 22230001, -- 22230001,
-- 22230002, -- 22230002,
-- 22230003, -- 22230003,
-- 22230004, -- 22230004,
-- 22230005, -- 22230005,
-- 22230006, -- 22230006,
-- 22230007, -- 22230007,
-- 22230008, -- 22230008,
-- 22231001, -- 22231001,
-- 22232001, -- 22232001,
-- 22232101, -- 22232101,
22260001, 22260001,
22260002, 22260002,
22260003, 22260003,
22260901, 22260901,
22260902, 22260902,
22260903, 22260903,
22261101, 22261101,
22261102, 22261102,
22261103, 22261103,
22262201, 22262201,
-- 22271101, -- 22271101,
-- 22271102, -- 22271102,
-- 22271103, -- 22271103,
-- 22271104, -- 22271104,
-- 22271105, -- 22271105,
-- 22271106, -- 22271106,
22291001, 22291001,
22291102, 22291102,
22292001, 22292001,
22292002, 22292002,
22292003, 22292003,
22292004, 22292004,
22292005, 22292005,
22292006, 22292006,
22292007, 22292007,
22292009, 22292009,
22292011, 22292011,
22292012, 22292012,
22292101, 22292101,
22292201, 22292201,
33330078, 33330078,
-- 50008100, -- 50008100,
-- 50008101, -- 50008101,
-- 50008102, -- 50008102,
-- 50008103, -- 50008103,
-- 50008106, -- 50008106,
-- 50008108, -- 50008108,
-- 50008109, -- 50008109,
66915001, 66915001,
66915002, 66915002,
66915003, 66915003,
66915004, 66915004,
66915005, 66915005,
66915008, 66915008,
66915009, 66915009,
66915010, 66915010,
66915011, 66915011,
66915012, 66915012,
66915013, 66915013,
66915014, 66915014,
66915015, 66915015,
66915017, 66915017,
66915018, 66915018,
66915021, 66915021,
66915023, 66915023,
66915025, 66915025,
66915027, 66915027,
66915028, 66915028,
66915029, 66915029,
66915030, 66915030,
66915032, 66915032,
66915034, 66915034,
66915035, 66915035,
66915036, 66915036,
66915040, 66915040,
66915041, 66915041,
66916000, 66916000,
66916001, 66916001,
66916002, 66916002,
66916006, 66916006,
66916009, 66916009,
66917000, 66917000,
66917001, 66917001,
66917015, 66917015,
66917016, 66917016,
66919000, 66919000,
66919002, 66919002,
66919003, 66919003,
66919004, 66919004,
66919005, 66919005,
66919006, 66919006,
66919008, 66919008,
74560001, 74560001,
74560002, 74560002,
74560003, 74560003,
74560004, 74560004,
74560005, 74560005,
74560006, 74560006,
74560007, 74560007,
74560009, 74560009,
74560010, 74560010,
74560011, 74560011,
74560016, 74560016,
74560017, 74560017,
74560018, 74560018,
74560019, 74560019,
74561002, 74561002,
74561003, 74561003,
74561005, 74561005,
74561009, 74561009,
74561010, 74561010,
74561011, 74561011,
74561013, 74561013,
74561015, 74561015,
74561019, 74561019,
74561020, 74561020,
74561021, 74561021,
74561023, 74561023,
74561032, 74561032,
74561037, 74561037,
74561405, 74561405,
74561415, 74561415,
74562002, 74562002,
74562005, 74562005,
74562008, 74562008,
74562009, 74562009,
74562010, 74562010,
74562011, 74562011,
74562012, 74562012,
74562013, 74562013,
74562014, 74562014,
74562015, 74562015,
74562016, 74562016,
74562017, 74562017,
86379106, 86379106,
86379108, 86379108,
86379110, 86379110,
86379112, 86379112,
86379114, 86379114,
86379116, 86379116,
86379122, 86379122,
86379144, 86379144,
86379146, 86379146,
86379152, 86379152,
86379162, 86379162,
86379164, 86379164,
86379166, 86379166,
86379168, 86379168,
86379172, 86379172,
86379184, 86379184,
86379186, 86379186,
86379201, 86379201,
86379203, 86379203,
86379205, 86379205,
86379207, 86379207,
86379209, 86379209,
86379211, 86379211,
86379213, 86379213,
86379215, 86379215,
86379217, 86379217,
86379219, 86379219,
86379221, 86379221,
86379223, 86379223,
86379225, 86379225,
86379231, 86379231,
86379233, 86379233,
86379237, 86379237,
86379239, 86379239,
86379241, 86379241,
86379243, 86379243,
86379245, 86379245,
86379247, 86379247,
86379251, 86379251,
86379253, 86379253,
86379255, 86379255,
86379257, 86379257,
86379259, 86379259,
86379261, 86379261,
86379265, 86379265,
86379267, 86379267,
86379269, 86379269,
86379270, 86379270,
86379273, 86379273,
86379301, 86379301,
86379303, 86379303,
86379305, 86379305,
86379307, 86379307,
86379309, 86379309,
86379315, 86379315,
86379317, 86379317,
86379319, 86379319,
86379321, 86379321,
86379323, 86379323,
86379325, 86379325,
86379327, 86379327,
86379329, 86379329,
86379331, 86379331,
86379333, 86379333,
86379335, 86379335,
86379337, 86379337,
86379341, 86379341,
86379343, 86379343,
86379345, 86379345,
86379347, 86379347,
86379401, 86379401,
86379417, 86379417,
86379419, 86379419,
86379421, 86379421,
86379423, 86379423,
86379425, 86379425,
86379429, 86379429,
86379431, 86379431,
86379433, 86379433,
86379435, 86379435,
86379439, 86379439,
86379501, 86379501,
-- 86379503, -- 86379503,
-- 86379505, -- 86379505,
86379507, 86379507,
86379509, 86379509,
86379519, 86379519,
86379601, 86379601,
86379603, 86379603,
86379605, 86379605,
86379607, 86379607,
86379609, 86379609,
86379611, 86379611,
86379613, 86379613,
86379617, 86379617,
86379619, 86379619,
86379627, 86379627,
86379629, 86379629,
86379631, 86379631,
86379633, 86379633,
86379656, 86379656,
86379658, 86379658,
86379660, 86379660,
86379666, 86379666,
86379668, 86379668,
86379700, 86379700,
86379702, 86379702,
86379703, 86379703,
86379704, 86379704,
86379706, 86379706,
86379708, 86379708,
86379710, 86379710,
86379712, 86379712,
86379716, 86379716,
86379718, 86379718,
86379720, 86379720,
86379722, 86379722,
86379724, 86379724,
86379726, 86379726,
86379728, 86379728,
86379734, 86379734,
86379736, 86379736,
86379738, 86379738,
86379740, 86379740,
86379742, 86379742,
86379744, 86379744,
86379746, 86379746,
86379748, 86379748,
86379750, 86379750,
86379752, 86379752,
86379754, 86379754,
86379758, 86379758,
86379760, 86379760,
86379762, 86379762,
86379766, 86379766,
86379768, 86379768,
86379770, 86379770,
86379772, 86379772,
86379774, 86379774,
86379776, 86379776,
86379779, 86379779,
86379781, 86379781,
86379785, 86379785,
86379787, 86379787,
86379789, 86379789,
86379791, 86379791,
86379795, 86379795,
86379796, 86379796,
86379797, 86379797,
86379798, 86379798,
86379801, 86379801,
86379803, 86379803,
86379805, 86379805,
86379807, 86379807,
86379809, 86379809,
86379811, 86379811,
86379813, 86379813,
86379815, 86379815,
86379817, 86379817,
86379819, 86379819,
86379850, 86379850,
86379852, 86379852,
86379854, 86379854,
86379856, 86379856,
86379900, 86379900,
86379901, 86379901,
86379903, 86379903,
86379905, 86379905,
86379907, 86379907,
86379921, 86379921,
86379923, 86379923,
86379925, 86379925,
86379927, 86379927,
86379931, 86379931,
86379933, 86379933,
-- 86379935, -- 86379935,
86379937, 86379937,
-- 86379939, -- 86379939,
86379999, 86379999,
99677002, 99677002,
99677703, 99677703,
99677704, 99677704,
99677707, 99677707,
99677708, 99677708,
99677709, 99677709,
99677711, 99677711,
99677712, 99677712,
99677713, 99677713,
99677714, 99677714,
99677715, 99677715,
99677720, 99677720,
99677797, 99677797,
-- 99677799, -- 99677799,
17061480, --1.999z2 17061480, --1.999z2
60305, 60305,
20304, 20304,
86379821, 86379821,
25135, 25135,
17035570, 17035570,
86379823, 86379823,
20100225, --1.999z4 20100225, --1.999z4
20100227, 20100227,
20100204, 20100204,
20100206, 20100206,
20100208, 20100208,
20100200, 20100200,
20100202, 20100202,
20100239, 20100239,
20100240, 20100240,
-- 86379837, -- 86379837,
99999001, 99999001,
20100235, 20100235,
20100241, 20100241,
20100243, 20100243,
20100245, 20100245,
20100247, 20100247,
20100249, 20100249,
20100251, 20100251,
20100253, 20100253,
20100255, 20100255,
20100257, 20100257,
20100259, 20100259,
20100262, 20100262,
20100264, 20100264,
20100266, 20100266,
20100268, 20100268,
20100270, 20100270,
20100272, 20100272,
20100233, 20100233,
20100236, 20100236,
27059, 27059,
20305, 20305,
27035, 27035,
27039, 27039,
27038 27038
} }
CardList.Extra={ CardList.Extra={
10003, 10003,
10004, 10004,
10005, 10005,
10006, 10006,
10008, 10008,
10009, 10009,
10012, 10012,
10019, 10019,
10021, 10021,
10226, 10226,
10229, 10229,
10238, 10238,
10240, 10240,
10242, 10242,
10250, 10250,
10350, 10350,
10501, 10501,
10502, 10502,
10504, 10504,
10511, 10511,
10512, 10512,
10514, 10514,
11016, 11016,
11018, 11018,
11022, 11022,
11024, 11024,
11026, 11026,
11027, 11027,
11029, 11029,
11031, 11031,
12018, 12018,
12022, 12022,
12024, 12024,
12026, 12026,
12028, 12028,
12030, 12030,
13066, 13066,
13081, 13081,
14016, 14016,
14019, 14019,
14057, 14057,
14063, 14063,
14064, 14064,
14070, 14070,
15051, 15051,
15053, 15053,
15059, 15059,
15060, 15060,
15070, 15070,
15071, 15071,
15075, 15075,
15076, 15076,
19011, 19011,
19012, 19012,
19013, 19013,
19014, 19014,
19015, 19015,
19016, 19016,
19017, 19017,
19018, 19018,
19019, 19019,
19020, 19020,
19025, 19025,
19026, 19026,
19027, 19027,
19030, 19030,
19033, 19033,
19036, 19036,
19037, 19037,
19038, 19038,
19039, 19039,
19040, 19040,
19045, 19045,
19047, 19047,
19050, 19050,
19051, 19051,
19052, 19052,
19055, 19055,
19056, 19056,
19058, 19058,
19060, 19060,
19061, 19061,
19062, 19062,
19063, 19063,
20013, 20013,
20016, 20016,
20024, 20024,
20028, 20028,
20030, 20030,
20035, 20035,
20036, 20036,
20038, 20038,
20039, 20039,
20041, 20041,
20042, 20042,
20043, 20043,
20061, 20061,
20112, 20112,
20125, 20125,
20132, 20132,
20133, 20133,
20134, 20134,
20138, 20138,
20242, 20242,
20243, 20243,
20245, 20245,
20246, 20246,
20247, 20247,
20272, 20272,
20275, 20275,
20280, 20280,
20350, 20350,
20501, 20501,
20502, 20502,
20504, 20504,
20505, 20505,
20506, 20506,
20507, 20507,
20811, 20811,
21018, 21018,
21021, 21021,
21024, 21024,
21025, 21025,
21059, 21059,
21061, 21061,
21062, 21062,
21064, 21064,
21066, 21066,
21068, 21068,
21088, 21088,
21142, 21142,
21161, 21161,
21167, 21167,
21501, 21501,
21504, 21504,
22024, 22024,
22025, 22025,
22028, 22028,
22029, 22029,
22038, 22038,
22040, 22040,
22043, 22043,
22046, 22046,
22049, 22049,
22050, 22050,
22052, 22052,
22053, 22053,
22094, 22094,
22097, 22097,
22098, 22098,
22099, 22099,
22234, 22234,
22236, 22236,
22238, 22238,
22240, 22240,
22501, 22501,
22502, 22502,
22503, 22503,
22504, 22504,
22507, 22507,
22510, 22510,
22513, 22513,
22516, 22516,
23022, 23022,
23025, 23025,
23031, 23031,
23061, 23061,
23064, 23064,
23067, 23067,
23070, 23070,
23126, 23126,
23129, 23129,
23150, 23150,
23153, 23153,
23162, 23162,
23165, 23165,
23212, 23212,
23243, 23243,
23261, 23261,
23501, 23501,
23504, 23504,
23507, 23507,
23510, 23510,
24013, 24013,
24014, 24014,
24022, 24022,
24023, 24023,
24030, 24030,
24071, 24071,
24072, 24072,
24073, 24073,
24080, 24080,
24100, 24100,
24125, 24125,
24126, 24126,
24127, 24127,
24128, 24128,
24129, 24129,
24130, 24130,
24164, 24164,
24165, 24165,
24166, 24166,
24167, 24167,
24501, 24501,
24502, 24502,
24504, 24504,
24507, 24507,
25001, 25001,
25004, 25004,
25005, 25005,
25007, 25007,
25010, 25010,
25016, 25016,
25019, 25019,
25086, 25086,
25109, 25109,
25110, 25110,
25120, 25120,
25141, 25141,
25171, 25171,
25200, 25200,
25340, 25340,
25501, 25501,
25502, 25502,
25503, 25503,
25504, 25504,
25505, 25505,
25506, 25506,
25508, 25508,
25509, 25509,
25511, 25511,
25512, 25512,
25514, 25514,
26015, 26015,
26016, 26016,
26018, 26018,
26020, 26020,
26021, 26021,
26072, 26072,
26073, 26073,
26074, 26074,
26078, 26078,
26079, 26079,
26501, 26501,
26504, 26504,
26507, 26507,
27019, 27019,
27020, 27020,
27082, 27082,
27085, 27085,
27142, 27142,
27150, 27150,
27501, 27501,
27504, 27504,
28501, 28501,
28504, 28504,
28507, 28507,
29024, 29024,
29027, 29027,
29050, 29050,
29501, 29501,
30001, 30001,
30002, 30002,
30003, 30003,
30004, 30004,
30011, 30011,
30012, 30012,
31024, 31024,
31027, 31027,
31030, 31030,
31035, 31035,
31040, 31040,
31043, 31043,
31046, 31046,
31049, 31049,
31060, 31060,
31501, 31501,
31502, 31502,
31503, 31503,
40029, 40029,
51113, 51113,
60051, 60051,
60054, 60054,
60064, 60064,
60073, 60073,
60075, 60075,
60077, 60077,
60320, 60320,
60621, 60621,
60922, 60922,
61221, 61221,
64001, 64001,
64004, 64004,
64007, 64007,
70004, 70004,
70010, 70010,
70016, 70016,
70021, 70021,
70025, 70025,
70029, 70029,
70033, 70033,
70039, 70039,
70045, 70045,
70050, 70050,
70070, 70070,
70080, 70080,
70100, 70100,
82436, 82436,
82437, 82437,
82438, 82438,
82439, 82439,
82440, 82440,
82444, 82444,
82445, 82445,
82446, 82446,
82448, 82448,
82450, 82450,
82451, 82451,
82452, 82452,
82456, 82456,
82457, 82457,
82458, 82458,
82459, 82459,
82461, 82461,
82462, 82462,
82463, 82463,
82466, 82466,
82467, 82467,
82468, 82468,
82470, 82470,
82471, 82471,
82472, 82472,
82473, 82473,
82479, 82479,
82480, 82480,
82481, 82481,
88888, 88888,
200007, 200007,
200008, 200008,
200011, 200011,
200303, 200303,
210008, 210008,
210009, 210009,
210010, 210010,
401307, 401307,
401308, 401308,
401310, 401310,
401311, 401311,
431401, 431401,
431402, 431402,
431403, 431403,
501101, 501101,
501102, 501102,
501104, 501104,
501105, 501105,
501107, 501107,
501108, 501108,
999001, 999001,
999002, 999002,
999003, 999003,
999005, 999005,
999008, 999008,
999009, 999009,
999012, 999012,
999013, 999013,
999206, 999206,
999208, 999208,
999209, 999209,
999213, 999213,
999216, 999216,
999217, 999217,
999218, 999218,
-- 999219, -- 999219,
999303, 999303,
999304, 999304,
999311, 999311,
999507, 999507,
999508, 999508,
999513, 999513,
999702, 999702,
999704, 999704,
999706, 999706,
999708, 999708,
999709, 999709,
999718, 999718,
999719, 999719,
999720, 999720,
999721, 999721,
999914, 999914,
999915, 999915,
999916, 999916,
999917, 999917,
999919, 999919,
1153605, 1153605,
1154003, 1154003,
1156013, 1156013,
1156019, 1156019,
7001041, 7001041,
7001060, 7001060,
7001061, 7001061,
7001080, 7001080,
7001081, 7001081,
7001082, 7001082,
7770019, 7770019,
7770060, 7770060,
7770099, 7770099,
13001003, 13001003,
13001006, 13001006,
13001009, 13001009,
13001012, 13001012,
13002006, 13002006,
13002009, 13002009,
13002012, 13002012,
-- 14000026, -- 14000026,
14000060, 14000060,
14000061, 14000061,
14000062, 14000062,
14000063, 14000063,
14000064, 14000064,
14000065, 14000065,
14000069, 14000069,
14000070, 14000070,
14000261, 14000261,
14000263, 14000263,
14000264, 14000264,
14000265, 14000265,
14000266, 14000266,
14000271, 14000271,
14000278, 14000278,
14000279, 14000279,
14000280, 14000280,
14000281, 14000281,
14000282, 14000282,
14000283, 14000283,
14000538, 14000538,
14000539, 14000539,
14000555, 14000555,
14000564, 14000564,
14090022, 14090022,
14090023, 14090023,
14090024, 14090024,
14090028, 14090028,
14090029, 14090029,
16000161, 16000161,
16010141, 16010141,
16010161, 16010161,
16030101, 16030101,
16030102, 16030102,
16040121, 16040121,
17012001, 17012001,
17012002, 17012002,
17013103, 17013103,
17029130, 17029130,
17030000, 17030000,
17030110, 17030110,
17030130, 17030130,
17030150, 17030150,
17030200, 17030200,
17035000, 17035000,
17035130, 17035130,
17050927, 17050927,
17050932, 17050932,
17050933, 17050933,
17050936, 17050936,
17052936, 17052936,
17052940, 17052940,
17060882, 17060882,
17060890, 17060890,
17060907, 17060907,
17060938, 17060938,
17060940, 17060940,
17061010, 17061010,
17061020, 17061020,
17061040, 17061040,
17061060, 17061060,
19114514, 19114514,
19214521, 19214521,
19214541, 19214541,
21470014, 21470014,
21470015, 21470015,
21470016, 21470016,
22200122, 22200122,
-- 22200161, -- 22200161,
22200162, 22200162,
-- 22230141, -- 22230141,
-- 22230143, -- 22230143,
-- 22230161, -- 22230161,
22260161, 22260161,
22260162, 22260162,
-- 50008104, -- 50008104,
-- 50008105, -- 50008105,
-- 50008107, -- 50008107,
-- 50008110, -- 50008110,
66915000, 66915000,
66915006, 66915006,
66915007, 66915007,
66915016, 66915016,
66915019, 66915019,
66915020, 66915020,
66915022, 66915022,
66915024, 66915024,
66915026, 66915026,
66915031, 66915031,
66915033, 66915033,
66915037, 66915037,
66915038, 66915038,
66915043, 66915043,
66917002, 66917002,
66917003, 66917003,
66917004, 66917004,
66917005, 66917005,
66917006, 66917006,
66917007, 66917007,
66917009, 66917009,
66917010, 66917010,
66917011, 66917011,
66917012, 66917012,
66917013, 66917013,
66917014, 66917014,
66917017, 66917017,
66919007, 66919007,
66919009, 66919009,
66919010, 66919010,
66919011, 66919011,
66919012, 66919012,
66919014, 66919014,
74560013, 74560013,
74560014, 74560014,
74560015, 74560015,
74561001, 74561001,
74561004, 74561004,
74561006, 74561006,
74561007, 74561007,
74561008, 74561008,
74561012, 74561012,
74561014, 74561014,
74561016, 74561016,
74561017, 74561017,
74561018, 74561018,
74561022, 74561022,
74561025, 74561025,
74561030, 74561030,
74561031, 74561031,
74561033, 74561033,
74561034, 74561034,
74561035, 74561035,
74561036, 74561036,
74561038, 74561038,
74561040, 74561040,
74561041, 74561041,
74561042, 74561042,
74561043, 74561043,
74561044, 74561044,
74561045, 74561045,
74561048, 74561048,
74561050, 74561050,
74561051, 74561051,
74561099, 74561099,
74561100, 74561100,
74562001, 74562001,
74562003, 74562003,
74562004, 74562004,
74562006, 74562006,
74562007, 74562007,
74562020, 74562020,
86379154, 86379154,
86379158, 86379158,
86379160, 86379160,
86379170, 86379170,
86379174, 86379174,
86379227, 86379227,
86379311, 86379311,
86379313, 86379313,
86379339, 86379339,
86379403, 86379403,
86379405, 86379405,
86379407, 86379407,
86379409, 86379409,
86379411, 86379411,
86379413, 86379413,
86379415, 86379415,
86379427, 86379427,
86379437, 86379437,
86379615, 86379615,
86379621, 86379621,
86379623, 86379623,
86379625, 86379625,
86379635, 86379635,
86379662, 86379662,
86379664, 86379664,
86379714, 86379714,
86379730, 86379730,
86379764, 86379764,
86379777, 86379777,
86379778, 86379778,
86379799, 86379799,
86379800, 86379800,
-- 86379911, -- 86379911,
-- 86379913, -- 86379913,
-- 86379915, -- 86379915,
-- 86379917, -- 86379917,
99677001, 99677001,
99677793, 99677793,
99677794, 99677794,
99677795, 99677795,
99677796, 99677796,
17030230, --1.999z2 17030230, --1.999z2
13002015, 13002015,
23100101, 23100101,
20100218, --1.999z4 20100218, --1.999z4
20100216, 20100216,
20100231, 20100231,
20100210, 20100210,
20100214, 20100214,
20100212 20100212
} }
\ No newline at end of file
--dark synchro summon --dark synchro summon
DS = {} DS = {}
function DS.AddDarkSynchroProcedure(c,f1,f2,dslv) function DS.AddDarkSynchroProcedure(c,f1,f2,dslv)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(DS.syncon(f1,f2,dslv)) e1:SetCondition(DS.syncon(f1,f2,dslv))
e1:SetTarget(DS.syntg(f1,f2,dslv)) e1:SetTarget(DS.syntg(f1,f2,dslv))
e1:SetOperation(DS.synop(f1,f2,dslv)) e1:SetOperation(DS.synop(f1,f2,dslv))
e1:SetValue(SUMMON_TYPE_SYNCHRO) e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function DS.AddDarkSynchroProcedureWithDesc(c,f1,f2,dslv,desc) function DS.AddDarkSynchroProcedureWithDesc(c,f1,f2,dslv,desc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(desc) e1:SetDescription(desc)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(DS.syncon(f1,f2,dslv)) e1:SetCondition(DS.syncon(f1,f2,dslv))
e1:SetTarget(DS.syntg(f1,f2,dslv)) e1:SetTarget(DS.syntg(f1,f2,dslv))
e1:SetOperation(DS.synop(f1,f2,dslv)) e1:SetOperation(DS.synop(f1,f2,dslv))
e1:SetValue(SUMMON_TYPE_SYNCHRO) e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--dark synchro summon --dark synchro summon
--暗黑调整过滤 --暗黑调整过滤
function DS.matfilter1(c,syncard,f1) function DS.matfilter1(c,syncard,f1)
return c:IsSetCard(0x6208) and c:IsType(TYPE_TUNER) and c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard) and (not f1 or f1(c)) return c:IsSetCard(0x6208) and c:IsType(TYPE_TUNER) and c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard) and (not f1 or f1(c))
end end
--非调整过滤 --非调整过滤
function DS.matfilter2(c,syncard,f2) function DS.matfilter2(c,syncard,f2)
return c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard) and not c:IsType(TYPE_TUNER) and (not f2 or f2(c)) return c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard) and not c:IsType(TYPE_TUNER) and (not f2 or f2(c))
end end
function DS.selfilter(c,syncard,lv,f1,f2,smg) function DS.selfilter(c,syncard,lv,f1,f2,smg)
return DS.matfilter1(c,syncard,f1) and smg:IsExists(DS.selfilter2,1,c,syncard,c:GetSynchroLevel(syncard)-lv,c,f2) return DS.matfilter1(c,syncard,f1) and smg:IsExists(DS.selfilter2,1,c,syncard,c:GetSynchroLevel(syncard)-lv,c,f2)
end end
function DS.selfilter2(c,syncard,lv,tuner,f2) function DS.selfilter2(c,syncard,lv,tuner,f2)
local tp=syncard:GetControler() local tp=syncard:GetControler()
local clv=c:GetSynchroLevel(syncard) local clv=c:GetSynchroLevel(syncard)
if c:GetFlagEffect(30000)>0 then if c:GetFlagEffect(30000)>0 then
clv=-clv clv=-clv
end end
return DS.matfilter2(c,syncard,f2) and clv==lv and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,tuner),syncard)>0 return DS.matfilter2(c,syncard,f2) and clv==lv and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,tuner),syncard)>0
end end
function DS.syncon(f1,f2,dslv) function DS.syncon(f1,f2,dslv)
return function (e,c,tuner,mg) return function (e,c,tuner,mg)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local smg=mg local smg=mg
if not smg then if not smg then
smg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil) smg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
end end
local lv=dslv or c:GetLevel() local lv=dslv or c:GetLevel()
if tuner then if tuner then
return DS.selfilter(tuner,c,lv,f1,f2,smg) return DS.selfilter(tuner,c,lv,f1,f2,smg)
else else
return smg:IsExists(DS.selfilter,1,nil,c,lv,f1,f2,smg) return smg:IsExists(DS.selfilter,1,nil,c,lv,f1,f2,smg)
end end
end end
end end
function DS.syntg(f1,f2,dslv) function DS.syntg(f1,f2,dslv)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg) return function(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
local smg=mg local smg=mg
if not smg then if not smg then
smg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil) smg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
end end
local lv = dslv or c:GetLevel() local lv = dslv or c:GetLevel()
--选择调整 --选择调整
local tc local tc
if not (tuner and DS.selfilter(tuner,c,lv,f1,f2,smg)) then if not (tuner and DS.selfilter(tuner,c,lv,f1,f2,smg)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
tc=smg:FilterSelect(tp,DS.selfilter,1,1,nil,c,lv,f1,f2,smg):GetFirst() tc=smg:FilterSelect(tp,DS.selfilter,1,1,nil,c,lv,f1,f2,smg):GetFirst()
else else
tc=tuner tc=tuner
end end
if not tc then return false end if not tc then return false end
--选择非调整 --选择非调整
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local ntc=smg:FilterSelect(tp,DS.selfilter2,1,1,tc,c,tc:GetSynchroLevel(c)-lv,tc,f2):GetFirst() local ntc=smg:FilterSelect(tp,DS.selfilter2,1,1,tc,c,tc:GetSynchroLevel(c)-lv,tc,f2):GetFirst()
if ntc then if ntc then
local g=Group.FromCards(tc,ntc) local g=Group.FromCards(tc,ntc)
g:KeepAlive() g:KeepAlive()
e:SetLabelObject(g) e:SetLabelObject(g)
return true return true
else else
return false return false
end end
end end
end end
function DS.synop(f1,f2,dslv) function DS.synop(f1,f2,dslv)
return function (e,tp,eg,ep,ev,re,r,rp,c,tuner,mg) return function (e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=e:GetLabelObject() local g=e:GetLabelObject()
c:SetMaterial(g) c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO+REASON_RULE) Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO+REASON_RULE)
g:DeleteGroup() g:DeleteGroup()
end end
end end
--黑暗同调怪兽通用限制 --黑暗同调怪兽通用限制
function DS.DarkSynLimit(c) function DS.DarkSynLimit(c)
--cannot xyz --cannot xyz
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot synchro --cannot synchro
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
--黑暗同调怪兽通用限制2(可做黑暗同调素材使用,黑暗同调黑暗调整 --黑暗同调怪兽通用限制2(可做黑暗同调素材使用,黑暗同调黑暗调整
function DS.DarkSynTunerLimit(c) function DS.DarkSynTunerLimit(c)
--cannot xyz --cannot xyz
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot synchro --cannot synchro
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2:SetValue(DS.synlimit) e2:SetValue(DS.synlimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
--黑暗调整怪兽通用限制 --黑暗调整怪兽通用限制
function DS.DarkTunerLimit(c) function DS.DarkTunerLimit(c)
--synchro summon --synchro summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(DS.synlimit) e1:SetValue(DS.synlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--synlimit --synlimit
function DS.synlimit(e,c) function DS.synlimit(e,c)
if c and not c:IsSetCard(0x5208) then return true end if c and not c:IsSetCard(0x5208) then return true end
end end
--高级黑暗同调怪兽不能用同调以外方法特殊召唤及特招不会被无效属性 --高级黑暗同调怪兽不能用同调以外方法特殊召唤及特招不会被无效属性
function DS.CantSp(c) function DS.CantSp(c)
--cannot special summon --cannot special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION) e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(aux.FALSE) e3:SetValue(aux.FALSE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--CANNOT_DISABLE_SPSUMMON --CANNOT_DISABLE_SPSUMMON
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) e4:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
\ No newline at end of file
-- --
Dss={} Dss={}
local dssflag = false local dssflag = false
--rewrite --rewrite
-- function Auxiliary.Stringid(code,id) -- function Auxiliary.Stringid(code,id)
-- if dssflag==true then -- if dssflag==true then
-- dssflag = false -- dssflag = false
-- Dss.setting() -- Dss.setting()
-- end -- end
-- return code*16+id -- return code*16+id
-- end -- end
function Dss.setting() function Dss.setting()
local e2=Effect.GlobalEffect() local e2=Effect.GlobalEffect()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PREDRAW) e2:SetCode(EVENT_PREDRAW)
e2:SetCondition(Dss.drawcon) e2:SetCondition(Dss.drawcon)
e2:SetTarget(Dss.drawtg) e2:SetTarget(Dss.drawtg)
e2:SetOperation(Dss.drawop) e2:SetOperation(Dss.drawop)
Duel.RegisterEffect(e2, 0) Duel.RegisterEffect(e2, 0)
end end
function Dss.drawcon(e,tp,eg,ep,ev,re,r,rp) function Dss.drawcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==1 return Duel.GetTurnCount()==1
end end
function Dss.drawtg(e,tp,eg,ep,ev,re,r,rp,chk) function Dss.drawtg(e,tp,eg,ep,ev,re,r,rp,chk)
local dt=Duel.GetDrawCount(Duel.GetTurnPlayer()) local dt=Duel.GetDrawCount(Duel.GetTurnPlayer())
if dt~=0 then if dt~=0 then
_replace_count=0 _replace_count=0
_replace_max=dt _replace_max=dt
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT) e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW) e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0) e1:SetValue(0)
Duel.RegisterEffect(e1,Duel.GetTurnPlayer()) Duel.RegisterEffect(e1,Duel.GetTurnPlayer())
local e0=Effect.GlobalEffect() local e0=Effect.GlobalEffect()
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE) e0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_PHASE+PHASE_END) e0:SetCode(EVENT_PHASE+PHASE_END)
e0:SetCondition(Dss.drawcon2) e0:SetCondition(Dss.drawcon2)
e0:SetReset(RESET_PHASE+PHASE_END) e0:SetReset(RESET_PHASE+PHASE_END)
e0:SetOperation(Dss.drawop2) e0:SetOperation(Dss.drawop2)
Duel.RegisterEffect(e0, Duel.GetTurnPlayer()) Duel.RegisterEffect(e0, Duel.GetTurnPlayer())
end end
end end
function Dss.drawop(e,tp,eg,ep,ev,re,r,rp) function Dss.drawop(e,tp,eg,ep,ev,re,r,rp)
_replace_count=_replace_count+1 _replace_count=_replace_count+1
if _replace_count>_replace_max then return end if _replace_count>_replace_max then return end
end end
function Dss.drawcon2(e,tp,eg,ep,ev,re,r,rp) function Dss.drawcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END return Duel.GetCurrentPhase()==PHASE_END
end end
function Dss.drawop2(e,tp,eg,ep,ev,re,r,rp) function Dss.drawop2(e,tp,eg,ep,ev,re,r,rp)
-- if Duel.SelectYesNo(Duel.GetTurnPlayer(), 25096*16+0) then -- if Duel.SelectYesNo(Duel.GetTurnPlayer(), 25096*16+0) then
Duel.Draw(Duel.GetTurnPlayer(),1,REASON_RULE) Duel.Draw(Duel.GetTurnPlayer(),1,REASON_RULE)
-- end -- end
e:Reset() e:Reset()
end end
\ No newline at end of file
-- --
Elf={} Elf={}
local ElfGlobalAttr = {} local ElfGlobalAttr = {}
ElfGlobalAttr[0] = 0 ElfGlobalAttr[0] = 0
ElfGlobalAttr[1] = 0 ElfGlobalAttr[1] = 0
function Elf.GetElfAttr(tp) function Elf.GetElfAttr(tp)
return ElfGlobalAttr[tp] return ElfGlobalAttr[tp]
end end
function Elf.SetElfAttr(tp,attr) function Elf.SetElfAttr(tp,attr)
ElfGlobalAttr[tp] = attr ElfGlobalAttr[tp] = attr
end end
-- --
Ets={} Ets={}
--ETS --ETS
local ETStore = {} local ETStore = {}
function Ets.EffectTempStore(e,num) function Ets.EffectTempStore(e,num)
if ETStore[num]==nil then ETStore[num]=e end if ETStore[num]==nil then ETStore[num]=e end
end end
function Ets.EffectTempCloneConChange(c,num,f) function Ets.EffectTempCloneConChange(c,num,f)
if ETStore[num]~=nil then if ETStore[num]~=nil then
local e0=ETStore[num]:Clone() local e0=ETStore[num]:Clone()
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DAMAGE_STEP) e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DAMAGE_STEP)
e0:SetCondition(f) e0:SetCondition(f)
e0:SetLabel(num) e0:SetLabel(num)
c:RegisterEffect(e0) c:RegisterEffect(e0)
end end
end end
function Ets.RegCommonEffect(c) function Ets.RegCommonEffect(c)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(c:GetOriginalCode(),0)) e0:SetDescription(aux.Stringid(c:GetOriginalCode(),0))
e0:SetCategory(CATEGORY_DESTROY) e0:SetCategory(CATEGORY_DESTROY)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e0:SetCode(EVENT_BATTLE_DESTROYING) e0:SetCode(EVENT_BATTLE_DESTROYING)
e0:SetCondition(Ets.con0) e0:SetCondition(Ets.con0)
e0:SetTarget(Ets.tg) e0:SetTarget(Ets.tg)
e0:SetOperation(Ets.op) e0:SetOperation(Ets.op)
c:RegisterEffect(e0) c:RegisterEffect(e0)
local e1=e0:Clone() local e1=e0:Clone()
e1:SetCondition(Ets.con1) e1:SetCondition(Ets.con1)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
c:RegisterEffect(e1) c:RegisterEffect(e1)
return e0,e1 return e0,e1
end end
function Ets.con0(e,tp,eg,ep,ev,re,r,rp) function Ets.con0(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:GetFlagEffect(999100)>0 then return false end if c:GetFlagEffect(999100)>0 then return false end
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER)
end end
function Ets.con1(e,tp,eg,ep,ev,re,r,rp) function Ets.con1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:GetFlagEffect(999100)<1 then return false end if c:GetFlagEffect(999100)<1 then return false end
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER)
end end
function Ets.tg(e,tp,eg,ep,ev,re,r,rp,chk) function Ets.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0)
end end
function Ets.op(e,tp,eg,ep,ev,re,r,rp) function Ets.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end end
\ No newline at end of file
--module for fusion material func --module for fusion material func
--script by Nanahira --script by Nanahira
Fus=Fus or {} Fus=Fus or {}
local table=require("table") local table=require("table")
function Fus.CodeFilter(code) function Fus.CodeFilter(code)
return function(c) return function(c)
return c:IsFusionCode(code) return c:IsFusionCode(code)
end end
end end
function Fus.AddFusionProcCode2(c,code1,code2,sub,insf) function Fus.AddFusionProcCode2(c,code1,code2,sub,insf)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mt=_G["c"..c:GetOriginalCode()] local mt=_G["c"..c:GetOriginalCode()]
mt.hana_mat={Fus.CodeFilter(code1),Fus.CodeFilter(code2)} mt.hana_mat={Fus.CodeFilter(code1),Fus.CodeFilter(code2)}
aux.AddFusionProcCode2(c,code1,code2,sub,insf) aux.AddFusionProcCode2(c,code1,code2,sub,insf)
end end
function Fus.AddFusionProcCode3(c,code1,code2,code3,sub,insf) function Fus.AddFusionProcCode3(c,code1,code2,code3,sub,insf)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mt=_G["c"..c:GetOriginalCode()] local mt=_G["c"..c:GetOriginalCode()]
mt.hana_mat={Fus.CodeFilter(code1),Fus.CodeFilter(code2),Fus.CodeFilter(code3)} mt.hana_mat={Fus.CodeFilter(code1),Fus.CodeFilter(code2),Fus.CodeFilter(code3)}
aux.AddFusionProcCode3(c,code1,code2,code3,sub,insf) aux.AddFusionProcCode3(c,code1,code2,code3,sub,insf)
end end
function Fus.AddFusionProcCode4(c,code1,code2,code3,code4,sub,insf) function Fus.AddFusionProcCode4(c,code1,code2,code3,code4,sub,insf)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mt=_G["c"..c:GetOriginalCode()] local mt=_G["c"..c:GetOriginalCode()]
mt.hana_mat={Fus.CodeFilter(code1),Fus.CodeFilter(code2),Fus.CodeFilter(code3),Fus.CodeFilter(code4)} mt.hana_mat={Fus.CodeFilter(code1),Fus.CodeFilter(code2),Fus.CodeFilter(code3),Fus.CodeFilter(code4)}
aux.AddFusionProcCode4(c,code1,code2,code3,code4,sub,insf) aux.AddFusionProcCode4(c,code1,code2,code3,code4,sub,insf)
end end
function Fus.AddFusionProcCodeFun(c,code1,f,cc,sub,insf) function Fus.AddFusionProcCodeFun(c,code1,f,cc,sub,insf)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mt=_G["c"..c:GetOriginalCode()] local mt=_G["c"..c:GetOriginalCode()]
mt.hana_mat={Fus.CodeFilter(code1),f} mt.hana_mat={Fus.CodeFilter(code1),f}
aux.AddFusionProcCodeFun(c,code1,f,cc,sub,insf) aux.AddFusionProcCodeFun(c,code1,f,cc,sub,insf)
end end
function Fus.AddFusionProcFun2(c,f1,f2,insf) function Fus.AddFusionProcFun2(c,f1,f2,insf)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mt=_G["c"..c:GetOriginalCode()] local mt=_G["c"..c:GetOriginalCode()]
mt.hana_mat={f1,f2} mt.hana_mat={f1,f2}
aux.AddFusionProcFun2(c,f1,f2,insf) aux.AddFusionProcFun2(c,f1,f2,insf)
end end
function Fus.AddFusionProcCodeRep(c,code1,cc,sub,insf) function Fus.AddFusionProcCodeRep(c,code1,cc,sub,insf)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mt=_G["c"..c:GetOriginalCode()] local mt=_G["c"..c:GetOriginalCode()]
mt.hana_mat={} mt.hana_mat={}
for i=1,cc do for i=1,cc do
table.insert(mt.hana_mat,Fus.CodeFilter(code1)) table.insert(mt.hana_mat,Fus.CodeFilter(code1))
end end
aux.AddFusionProcCodeRep(c,code1,cc,sub,insf) aux.AddFusionProcCodeRep(c,code1,cc,sub,insf)
end end
function Fus.AddFusionProcFunRep(c,f,cc,insf) function Fus.AddFusionProcFunRep(c,f,cc,insf)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mt=_G["c"..c:GetOriginalCode()] local mt=_G["c"..c:GetOriginalCode()]
mt.hana_mat={} mt.hana_mat={}
for i=1,cc do for i=1,cc do
table.insert(mt.hana_mat,f) table.insert(mt.hana_mat,f)
end end
aux.AddFusionProcFunRep(c,f,cc,insf) aux.AddFusionProcFunRep(c,f,cc,insf)
end end
function Fus.AddFusionProcFunFunRep(c,f1,f2,minc,maxc,insf) function Fus.AddFusionProcFunFunRep(c,f1,f2,minc,maxc,insf)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mt=_G["c"..c:GetOriginalCode()] local mt=_G["c"..c:GetOriginalCode()]
mt.hana_mat={f1} mt.hana_mat={f1}
for i=1,maxc do for i=1,maxc do
table.insert(mt.hana_mat,f2) table.insert(mt.hana_mat,f2)
end end
aux.AddFusionProcFunFunRep(c,f1,f2,minc,maxc,insf) aux.AddFusionProcFunFunRep(c,f1,f2,minc,maxc,insf)
end end
function Fus.AddFusionProcCodeFunRep(c,code1,f,minc,maxc,sub,insf) function Fus.AddFusionProcCodeFunRep(c,code1,f,minc,maxc,sub,insf)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mt=_G["c"..c:GetOriginalCode()] local mt=_G["c"..c:GetOriginalCode()]
mt.hana_mat={Fus.CodeFilter(code1)} mt.hana_mat={Fus.CodeFilter(code1)}
for i=1,maxc do for i=1,maxc do
table.insert(mt.hana_mat,f) table.insert(mt.hana_mat,f)
end end
aux.AddFusionProcCodeFunRep(c,code1,f,minc,maxc,sub,insf) aux.AddFusionProcCodeFunRep(c,code1,f,minc,maxc,sub,insf)
end end
function Fus.AddFusionProcFunMulti(c,insf,...) function Fus.AddFusionProcFunMulti(c,insf,...)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local funs={...} local funs={...}
local mt=_G["c"..c:GetOriginalCode()] local mt=_G["c"..c:GetOriginalCode()]
mt.hana_mat=funs mt.hana_mat=funs
local n=#funs local n=#funs
aux.AddFusionProcMix(c,true,insf,...) aux.AddFusionProcMix(c,true,insf,...)
end end
function Fus.NonImmuneFilter(c,e) function Fus.NonImmuneFilter(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
function Fus.FusionMaterialFilter(c,oppo) function Fus.FusionMaterialFilter(c,oppo)
if oppo and c:IsLocation(LOCATION_ONFIELD+LOCATION_REMOVED) and c:IsFacedown() then return false end if oppo and c:IsLocation(LOCATION_ONFIELD+LOCATION_REMOVED) and c:IsFacedown() then return false end
return c:IsCanBeFusionMaterial() and c:IsType(TYPE_MONSTER) return c:IsCanBeFusionMaterial() and c:IsType(TYPE_MONSTER)
end end
function Fus.GetFusionMaterial(tp,loc,oloc,f,gc,e,...) function Fus.GetFusionMaterial(tp,loc,oloc,f,gc,e,...)
local g1=Duel.GetFusionMaterial(tp) local g1=Duel.GetFusionMaterial(tp)
if loc then if loc then
local floc=bit.band(loc,LOCATION_ONFIELD+LOCATION_HAND) local floc=bit.band(loc,LOCATION_ONFIELD+LOCATION_HAND)
if floc~=0 then if floc~=0 then
g1=g1:Filter(Card.IsLocation,nil,floc) g1=g1:Filter(Card.IsLocation,nil,floc)
else else
g1:Clear() g1:Clear()
end end
local eloc=loc-floc local eloc=loc-floc
if eloc~=0 then if eloc~=0 then
local g2=Duel.GetMatchingGroup(Fus.FusionMaterialFilter,tp,eloc,0,nil) local g2=Duel.GetMatchingGroup(Fus.FusionMaterialFilter,tp,eloc,0,nil)
g1:Merge(g2) g1:Merge(g2)
end end
end end
if oloc and oloc~=0 then if oloc and oloc~=0 then
local g3=Duel.GetMatchingGroup(Fus.FusionMaterialFilter,tp,0,oloc,nil,true) local g3=Duel.GetMatchingGroup(Fus.FusionMaterialFilter,tp,0,oloc,nil,true)
g1:Merge(g3) g1:Merge(g3)
end end
if f then g1=g1:Filter(f,nil,...) end if f then g1=g1:Filter(f,nil,...) end
if gc then g1:RemoveCard(gc) end if gc then g1:RemoveCard(gc) end
if e then g1=g1:Filter(Fus.NonImmuneFilter,nil,e) end if e then g1=g1:Filter(Fus.NonImmuneFilter,nil,e) end
return g1 return g1
end end
function Fus.CheckMaterialSingle(c,fc,mc) function Fus.CheckMaterialSingle(c,fc,mc)
local tp=fc:GetControler() local tp=fc:GetControler()
if not c:IsCanBeFusionMaterial(fc) or Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc),fc)<=0 then return false end if not c:IsCanBeFusionMaterial(fc) or Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc),fc)<=0 then return false end
local t=fc.hana_mat local t=fc.hana_mat
if not t then return false end if not t then return false end
for i,f in pairs(t) do for i,f in pairs(t) do
if f(c) then return true end if f(c) then return true end
end end
return false return false
end end
\ No newline at end of file
-- --
Msc={} Msc={}
--mscarr --mscarr
local mscarr = {} local mscarr = {}
local mscarr2 = {} local mscarr2 = {}
for i=0,7 do for i=0,7 do
mscarr[i] = {} mscarr[i] = {}
for j=0,7 do for j=0,7 do
mscarr[i][j] = 0 mscarr[i][j] = 0
end end
end end
for i=0,5 do for i=0,5 do
mscarr2[i] = {} mscarr2[i] = {}
for j=1,4 do for j=1,4 do
mscarr2[i][j] = 0 mscarr2[i][j] = 0
end end
end end
-- --
mscarr[1][5] = 888184 mscarr[1][5] = 888184
mscarr[1][6] = 888183 mscarr[1][6] = 888183
mscarr[2][5] = 888185 mscarr[2][5] = 888185
mscarr[5][6] = 888186 mscarr[5][6] = 888186
mscarr[2][3] = 888167 mscarr[2][3] = 888167
mscarr[3][4] = 888168 mscarr[3][4] = 888168
mscarr[0][3] = 888169 mscarr[0][3] = 888169
mscarr[1][2] = 888170 mscarr[1][2] = 888170
mscarr[1][3] = 888171 mscarr[1][3] = 888171
mscarr[2][4] = 888172 mscarr[2][4] = 888172
mscarr[0][2] = 888174 mscarr[0][2] = 888174
mscarr[0][1] = 888175 mscarr[0][1] = 888175
mscarr[0][4] = 888173 mscarr[0][4] = 888173
--mscarr[0][4] = 888176 --mscarr[0][4] = 888176
--mscarr[0][4] = 888194 --mscarr[0][4] = 888194
-- --
mscarr2[3][2] = 888136 mscarr2[3][2] = 888136
mscarr2[2][2] = 888137 mscarr2[2][2] = 888137
mscarr2[1][2] = 888138 mscarr2[1][2] = 888138
mscarr2[0][2] = 888139 mscarr2[0][2] = 888139
mscarr2[4][2] = 888140 mscarr2[4][2] = 888140
mscarr2[3][3] = 888151 mscarr2[3][3] = 888151
mscarr2[2][3] = 888152 mscarr2[2][3] = 888152
mscarr2[1][3] = 888153 mscarr2[1][3] = 888153
mscarr2[0][3] = 888154 mscarr2[0][3] = 888154
mscarr2[4][3] = 888155 mscarr2[4][3] = 888155
function unpack(t, i) function unpack(t, i)
i = i or 1 i = i or 1
if t[i] then if t[i] then
return t[i], unpack(t, i + 1) return t[i], unpack(t, i + 1)
end end
end end
function Msc.GetScSetCard(c1) function Msc.GetScSetCard(c1)
local sn1 = -1 local sn1 = -1
if c1:IsSetCard(0x178) then sn1 = 3 if c1:IsSetCard(0x178) then sn1 = 3
elseif c1:IsSetCard(0x179) then sn1 = 2 elseif c1:IsSetCard(0x179) then sn1 = 2
elseif c1:IsSetCard(0x180) then sn1 = 1 elseif c1:IsSetCard(0x180) then sn1 = 1
elseif c1:IsSetCard(0x181) then sn1 = 0 elseif c1:IsSetCard(0x181) then sn1 = 0
elseif c1:IsSetCard(0x182) then sn1 = 4 elseif c1:IsSetCard(0x182) then sn1 = 4
elseif c1:IsSetCard(0x183) then sn1 = 5 elseif c1:IsSetCard(0x183) then sn1 = 5
elseif c1:IsSetCard(0x184) then sn1 = 6 elseif c1:IsSetCard(0x184) then sn1 = 6
elseif c1:GetOriginalCode()==22200 then sn1 = 7 end elseif c1:GetOriginalCode()==22200 then sn1 = 7 end
return sn1 return sn1
end end
function Msc.IsCanMix2(c1,c2) function Msc.IsCanMix2(c1,c2)
local sn1 = Msc.GetScSetCard(c1) local sn1 = Msc.GetScSetCard(c1)
local sn2 = Msc.GetScSetCard(c2) local sn2 = Msc.GetScSetCard(c2)
if sn1==7 or sn2==7 then return true end if sn1==7 or sn2==7 then return true end
if sn1<0 or sn1>6 then return false end if sn1<0 or sn1>6 then return false end
if sn2<0 or sn2>6 then return false end if sn2<0 or sn2>6 then return false end
if bit.bor(mscarr[sn1][sn2],mscarr[sn2][sn1])~=0 then return true end if bit.bor(mscarr[sn1][sn2],mscarr[sn2][sn1])~=0 then return true end
return false return false
end end
function Msc.GetMix2(c1,c2,tp) function Msc.GetMix2(c1,c2,tp)
local sn1 = Msc.GetScSetCard(c1) local sn1 = Msc.GetScSetCard(c1)
local sn2 = Msc.GetScSetCard(c2) local sn2 = Msc.GetScSetCard(c2)
local code = bit.bor(mscarr[sn1][sn2],mscarr[sn2][sn1]) local code = bit.bor(mscarr[sn1][sn2],mscarr[sn2][sn1])
if code == 888173 then if code == 888173 then
local temp = Duel.SelectOption(tp, 22200*16+10, 22200*16+11, 22200*16+12) local temp = Duel.SelectOption(tp, 22200*16+10, 22200*16+11, 22200*16+12)
if temp == 0 then code = 888173 if temp == 0 then code = 888173
elseif temp == 1 then code = 888176 elseif temp == 1 then code = 888176
elseif temp == 2 then code = 888194 elseif temp == 2 then code = 888194
end end
end end
return code return code
end end
function Msc.GetMix2or3(sn1,num,tp) function Msc.GetMix2or3(sn1,num,tp)
local code = mscarr2[sn1][num] local code = mscarr2[sn1][num]
return code return code
end end
function Msc.ScMix(g,tp) function Msc.ScMix(g,tp)
local c1 = g:GetFirst() local c1 = g:GetFirst()
local c2 = g:GetNext() local c2 = g:GetNext()
local code = Msc.GetMix2(c1,c2,tp) local code = Msc.GetMix2(c1,c2,tp)
local token=Duel.CreateToken(tp,code) local token=Duel.CreateToken(tp,code)
return token return token
end end
function Msc.ScMix2(g,tp,flag) function Msc.ScMix2(g,tp,flag)
local c1 = g:GetFirst() local c1 = g:GetFirst()
local sn1 = Msc.GetScSetCard(c1) local sn1 = Msc.GetScSetCard(c1)
local num = g:GetCount() local num = g:GetCount()
local code = Msc.GetMix2or3(sn1,num+flag,tp) local code = Msc.GetMix2or3(sn1,num+flag,tp)
local token=Duel.CreateToken(tp,code) local token=Duel.CreateToken(tp,code)
return token return token
end end
function Msc.ScMixWithLW(g,tp) function Msc.ScMixWithLW(g,tp)
local c1 = g:GetFirst() local c1 = g:GetFirst()
local sn1 = Msc.GetScSetCard(c1) local sn1 = Msc.GetScSetCard(c1)
local code = 0 local code = 0
local temp = 0 local temp = 0
local select_tabel_string = {} local select_tabel_string = {}
local select_tabel_int = {} local select_tabel_int = {}
local tabel_hpoint = 1 local tabel_hpoint = 1
while temp<7 do while temp<7 do
if bit.bor(mscarr[sn1][temp],mscarr[temp][sn1]) ~= 0 then if bit.bor(mscarr[sn1][temp],mscarr[temp][sn1]) ~= 0 then
select_tabel_string[tabel_hpoint] = 22200*16+temp select_tabel_string[tabel_hpoint] = 22200*16+temp
select_tabel_int[tabel_hpoint] = temp select_tabel_int[tabel_hpoint] = temp
tabel_hpoint = tabel_hpoint + 1 tabel_hpoint = tabel_hpoint + 1
end end
temp = temp + 1 temp = temp + 1
end end
if tabel_hpoint>0 then if tabel_hpoint>0 then
temp = Duel.SelectOption(tp, unpack(select_tabel_string)) temp = Duel.SelectOption(tp, unpack(select_tabel_string))
temp = temp + 1 temp = temp + 1
code = bit.bor(mscarr[sn1][select_tabel_int[temp]],mscarr[select_tabel_int[temp]][sn1]) code = bit.bor(mscarr[sn1][select_tabel_int[temp]],mscarr[select_tabel_int[temp]][sn1])
if code == 888173 then if code == 888173 then
local temp2 = Duel.SelectOption(tp, 22200*16+10, 22200*16+11, 22200*16+12) local temp2 = Duel.SelectOption(tp, 22200*16+10, 22200*16+11, 22200*16+12)
if temp2 == 0 then code = 888173 if temp2 == 0 then code = 888173
elseif temp2 == 1 then code = 888176 elseif temp2 == 1 then code = 888176
elseif temp2 == 2 then code = 888194 elseif temp2 == 2 then code = 888194
end end
end end
local token=Duel.CreateToken(tp,code) local token=Duel.CreateToken(tp,code)
return token return token
end end
return 0 return 0
-- while code == 0 do -- while code == 0 do
-- temp = Duel.SelectOption(tp, 22200*16+0, 22200*16+1, 22200*16+2, 22200*16+3, 22200*16+4, 22200*16+5, 22200*16+6) -- temp = Duel.SelectOption(tp, 22200*16+0, 22200*16+1, 22200*16+2, 22200*16+3, 22200*16+4, 22200*16+5, 22200*16+6)
-- code = bit.bor(mscarr[sn1][temp],mscarr[temp][sn1]) -- code = bit.bor(mscarr[sn1][temp],mscarr[temp][sn1])
-- if code==0 then Duel.SelectOption(tp,22200*16+7) end -- if code==0 then Duel.SelectOption(tp,22200*16+7) end
-- end -- end
-- if code == 888173 then -- if code == 888173 then
-- local temp2 = Duel.SelectOption(tp, 22200*16+10, 22200*16+11, 22200*16+12) -- local temp2 = Duel.SelectOption(tp, 22200*16+10, 22200*16+11, 22200*16+12)
-- if temp2 == 0 then code = 888173 -- if temp2 == 0 then code = 888173
-- elseif temp2 == 1 then code = 888176 -- elseif temp2 == 1 then code = 888176
-- elseif temp2 == 2 then code = 888194 -- elseif temp2 == 2 then code = 888194
-- end -- end
-- end -- end
-- local token=Duel.CreateToken(tp,code) -- local token=Duel.CreateToken(tp,code)
-- return token -- return token
end end
function Msc.RegScMixEffect(c) function Msc.RegScMixEffect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetDescription(aux.Stringid(22200,8)) e3:SetDescription(aux.Stringid(22200,8))
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTarget(Msc.RegScMixEffectTarget) e3:SetTarget(Msc.RegScMixEffectTarget)
e3:SetOperation(Msc.RegScMixEffectOperation) e3:SetOperation(Msc.RegScMixEffectOperation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetDescription(aux.Stringid(22200,9)) e4:SetDescription(aux.Stringid(22200,9))
e4:SetTarget(Msc.RegScMixEffectTarget2) e4:SetTarget(Msc.RegScMixEffectTarget2)
e4:SetOperation(Msc.RegScMixEffectOperation2) e4:SetOperation(Msc.RegScMixEffectOperation2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function Msc.RScMEdactfilter(c) function Msc.RScMEdactfilter(c)
return c:IsFaceup() and c:IsSetCard(0x811) return c:IsFaceup() and c:IsSetCard(0x811)
end end
function Msc.RScMEmfilter1(c,this_card) function Msc.RScMEmfilter1(c,this_card)
return c:IsFaceup() and Msc.IsCanMix2(c,this_card) return c:IsFaceup() and Msc.IsCanMix2(c,this_card)
end end
function Msc.RScMEmfilter2(c,setcode) function Msc.RScMEmfilter2(c,setcode)
local sn = Msc.GetScSetCard(c) local sn = Msc.GetScSetCard(c)
return c:IsFaceup() and (sn==setcode or sn==7) return c:IsFaceup() and (sn==setcode or sn==7)
end end
function Msc.RScMEmfilterForTheLW(c) function Msc.RScMEmfilterForTheLW(c)
return c:GetOriginalCode()==22200 return c:GetOriginalCode()==22200
end end
function Msc.RegScMixEffectTarget(e,tp,eg,ep,ev,re,r,rp,chk) function Msc.RegScMixEffectTarget(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local mq=Duel.IsExistingMatchingCard(Msc.RScMEdactfilter,tp,LOCATION_MZONE,0,1,nil) local mq=Duel.IsExistingMatchingCard(Msc.RScMEdactfilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return (mq or Duel.CheckLPCost(tp,1000)) and if chk==0 then return (mq or Duel.CheckLPCost(tp,1000)) and
Duel.IsExistingMatchingCard(Msc.RScMEmfilter1,tp,LOCATION_SZONE,0,1,c,c) end Duel.IsExistingMatchingCard(Msc.RScMEmfilter1,tp,LOCATION_SZONE,0,1,c,c) end
if not mq then if not mq then
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end end
Duel.SetChainLimit(aux.FALSE) Duel.SetChainLimit(aux.FALSE)
end end
function Msc.RegScMixEffectOperation(e,tp,eg,ep,ev,re,r,rp) function Msc.RegScMixEffectOperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c then return end if not c then return end
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Msc.RScMEmfilter1,tp,LOCATION_SZONE,0,1,1,c,c) local g=Duel.SelectMatchingCard(tp,Msc.RScMEmfilter1,tp,LOCATION_SZONE,0,1,1,c,c)
if g:GetCount()>0 then g:AddCard(c) end if g:GetCount()>0 then g:AddCard(c) end
local flag = g:FilterCount(Msc.RScMEmfilterForTheLW,nil) local flag = g:FilterCount(Msc.RScMEmfilterForTheLW,nil)
if flag==1 then if flag==1 then
if Duel.SendtoGrave(g,REASON_MATERIAL)~=0 then if Duel.SendtoGrave(g,REASON_MATERIAL)~=0 then
--if not e:GetHandler():GetActivateEffect():IsActivatable(tp) then return end --if not e:GetHandler():GetActivateEffect():IsActivatable(tp) then return end
g:Remove(Msc.RScMEmfilterForTheLW,nil) g:Remove(Msc.RScMEmfilterForTheLW,nil)
local tc = Msc.ScMixWithLW(g,tp) local tc = Msc.ScMixWithLW(g,tp)
if tc ~= 0 then if tc ~= 0 then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,false) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,false)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
elseif flag==0 then elseif flag==0 then
if Duel.SendtoGrave(g,REASON_MATERIAL)~=0 then if Duel.SendtoGrave(g,REASON_MATERIAL)~=0 then
--if not e:GetHandler():GetActivateEffect():IsActivatable(tp) then return end --if not e:GetHandler():GetActivateEffect():IsActivatable(tp) then return end
local tc = Msc.ScMix(g,tp) local tc = Msc.ScMix(g,tp)
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,false) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,false)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
end end
function Msc.RegScMixEffectTarget2(e,tp,eg,ep,ev,re,r,rp,chk) function Msc.RegScMixEffectTarget2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local sn=Msc.GetScSetCard(c) local sn=Msc.GetScSetCard(c)
local mq=Duel.IsExistingMatchingCard(Msc.RScMEdactfilter,tp,LOCATION_MZONE,0,1,nil) local mq=Duel.IsExistingMatchingCard(Msc.RScMEdactfilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return (mq or Duel.CheckLPCost(tp,1000)) if chk==0 then return (mq or Duel.CheckLPCost(tp,1000))
and sn>=0 and sn<=4 and sn>=0 and sn<=4
and Duel.IsExistingMatchingCard(Msc.RScMEmfilter2,tp,LOCATION_SZONE,0,1,c,sn) end and Duel.IsExistingMatchingCard(Msc.RScMEmfilter2,tp,LOCATION_SZONE,0,1,c,sn) end
if not mq then if not mq then
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end end
Duel.SetChainLimit(aux.FALSE) Duel.SetChainLimit(aux.FALSE)
end end
function Msc.RegScMixEffectOperation2(e,tp,eg,ep,ev,re,r,rp) function Msc.RegScMixEffectOperation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c then return end if not c then return end
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Msc.RScMEmfilter2,tp,LOCATION_SZONE,0,1,2,c,Msc.GetScSetCard(c)) local g=Duel.SelectMatchingCard(tp,Msc.RScMEmfilter2,tp,LOCATION_SZONE,0,1,2,c,Msc.GetScSetCard(c))
if g:GetCount()>0 then g:AddCard(c) end if g:GetCount()>0 then g:AddCard(c) end
local flag = g:FilterCount(Msc.RScMEmfilterForTheLW,nil) local flag = g:FilterCount(Msc.RScMEmfilterForTheLW,nil)
if flag==1 then g:Remove(Msc.RScMEmfilterForTheLW,nil) end if flag==1 then g:Remove(Msc.RScMEmfilterForTheLW,nil) end
if Duel.SendtoGrave(g,REASON_MATERIAL)~=0 then if Duel.SendtoGrave(g,REASON_MATERIAL)~=0 then
--if not e:GetHandler():GetActivateEffect():IsActivatable(tp) then return end --if not e:GetHandler():GetActivateEffect():IsActivatable(tp) then return end
local tc = Msc.ScMix2(g,tp,flag) local tc = Msc.ScMix2(g,tp,flag)
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,false) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,false)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
\ No newline at end of file
-- --
Nef = Nef or {} Nef = Nef or {}
local os = require("os") local os = require("os")
-- require "nef/cardList" -- require "nef/cardList"
function Nef.unpack(t, i) function Nef.unpack(t, i)
i = i or 1 i = i or 1
if t[i] then if t[i] then
return t[i], Nef.unpack(t, i + 1) return t[i], Nef.unpack(t, i + 1)
end end
end end
function Nef.unpackOneMember(t, member, i) function Nef.unpackOneMember(t, member, i)
i = i or 1 i = i or 1
if t[i] and t[i][member] then if t[i] and t[i][member] then
return t[i][member], Nef.unpackOneMember(t, member, i+1) return t[i][member], Nef.unpackOneMember(t, member, i+1)
end end
end end
function Nef.AddSynchroProcedureWithDesc(c,f1,f2,ct,desc) function Nef.AddSynchroProcedureWithDesc(c,f1,f2,ct,desc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetDescription(desc) e1:SetDescription(desc)
e1:SetCondition(Auxiliary.SynCondition(f1,f2,ct,99)) e1:SetCondition(Auxiliary.SynCondition(f1,f2,ct,99))
e1:SetTarget(Auxiliary.SynTarget(f1,f2,ct,99)) e1:SetTarget(Auxiliary.SynTarget(f1,f2,ct,99))
e1:SetOperation(Auxiliary.SynOperation(f1,f2,ct,99)) e1:SetOperation(Auxiliary.SynOperation(f1,f2,ct,99))
e1:SetValue(SUMMON_TYPE_SYNCHRO) e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1) c:RegisterEffect(e1)
return e1 return e1
end end
function Nef.AddRitualProcEqual(c,filter,desc) function Nef.AddRitualProcEqual(c,filter,desc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(Auxiliary.RitualUltimateTarget(filter,Card.GetOriginalLevel,"Equal",LOCATION_HAND,nil,nil)) e1:SetTarget(Auxiliary.RitualUltimateTarget(filter,Card.GetOriginalLevel,"Equal",LOCATION_HAND,nil,nil))
e1:SetOperation(Auxiliary.RitualUltimateOperation(filter,Card.GetOriginalLevel,"Equal",LOCATION_HAND,nil,nil)) e1:SetOperation(Auxiliary.RitualUltimateOperation(filter,Card.GetOriginalLevel,"Equal",LOCATION_HAND,nil,nil))
e1:SetDescription(desc) e1:SetDescription(desc)
c:RegisterEffect(e1) c:RegisterEffect(e1)
return e1 return e1
end end
function Nef.AddXyzProcedureWithDesc(c,f,lv,ct,desc,maxct,alterf,op) function Nef.AddXyzProcedureWithDesc(c,f,lv,ct,desc,maxct,alterf,op)
if c.xyz_filter==nil then if c.xyz_filter==nil then
local code=c:GetOriginalCode() local code=c:GetOriginalCode()
local mt=_G["c" .. code] local mt=_G["c" .. code]
if f then if f then
mt.xyz_filter=function(mc) return f(mc) and mc:IsXyzLevel(c,lv) end mt.xyz_filter=function(mc) return f(mc) and mc:IsXyzLevel(c,lv) end
else else
mt.xyz_filter=function(mc) return mc:IsXyzLevel(c,lv) end mt.xyz_filter=function(mc) return mc:IsXyzLevel(c,lv) end
end end
mt.xyz_count=ct mt.xyz_count=ct
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetDescription(desc) e1:SetDescription(desc)
if not maxct then maxct=ct end if not maxct then maxct=ct end
if alterf then if alterf then
e1:SetCondition(Auxiliary.XyzCondition2(f,lv,ct,maxct,alterf,desc,op)) e1:SetCondition(Auxiliary.XyzCondition2(f,lv,ct,maxct,alterf,desc,op))
e1:SetTarget(Auxiliary.XyzTarget2(f,lv,ct,maxct,alterf,desc,op)) e1:SetTarget(Auxiliary.XyzTarget2(f,lv,ct,maxct,alterf,desc,op))
e1:SetOperation(Auxiliary.XyzOperation2(f,lv,ct,maxct,alterf,desc,op)) e1:SetOperation(Auxiliary.XyzOperation2(f,lv,ct,maxct,alterf,desc,op))
else else
e1:SetCondition(Auxiliary.XyzCondition(f,lv,ct,maxct)) e1:SetCondition(Auxiliary.XyzCondition(f,lv,ct,maxct))
e1:SetTarget(Auxiliary.XyzTarget(f,lv,ct,maxct)) e1:SetTarget(Auxiliary.XyzTarget(f,lv,ct,maxct))
e1:SetOperation(Auxiliary.XyzOperation(f,lv,ct,maxct)) e1:SetOperation(Auxiliary.XyzOperation(f,lv,ct,maxct))
end end
e1:SetValue(SUMMON_TYPE_XYZ) e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1) c:RegisterEffect(e1)
return e1 return e1
end end
function Auxiliary.EnablePendulumAttribute(c,reg) function Auxiliary.EnablePendulumAttribute(c,reg)
local argTable = {1} local argTable = {1}
return Nef.EnablePendulumAttributeSP(c,99,Auxiliary.TRUE,argTable,reg,nil) return Nef.EnablePendulumAttributeSP(c,99,Auxiliary.TRUE,argTable,reg,nil)
end end
function Nef.GetExtraPendulumEffect(c, code, count) function Nef.GetExtraPendulumEffect(c, code, count)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC_G) e1:SetCode(EFFECT_SPSUMMON_PROC_G)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(count or 1, code or 10000000) e1:SetCountLimit(count or 1, code or 10000000)
e1:SetCondition(Nef.PendConditionSP()) e1:SetCondition(Nef.PendConditionSP())
e1:SetOperation(Nef.PendOperationSP()) e1:SetOperation(Nef.PendOperationSP())
e1:SetValue(SUMMON_TYPE_PENDULUM) e1:SetValue(SUMMON_TYPE_PENDULUM)
return e1 return e1
end end
function Nef.EnablePendulumAttributeSP(c,num,filter,argTable,reg,tag) function Nef.EnablePendulumAttributeSP(c,num,filter,argTable,reg,tag)
local code=c:GetOriginalCode() local code=c:GetOriginalCode()
local mt=_G["c" .. code] local mt=_G["c" .. code]
local mlist={} local mlist={}
mlist.pend_filter=filter mlist.pend_filter=filter
mlist.pend_arg=argTable mlist.pend_arg=argTable
mlist.pend_num=num mlist.pend_num=num
mlist.pend_tag=tag mlist.pend_tag=tag
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(10000001) e2:SetCode(10000001)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetValue(Nef.order_table_new(mlist)) e2:SetValue(Nef.order_table_new(mlist))
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC_G) e1:SetCode(EFFECT_SPSUMMON_PROC_G)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1, 10000000) e1:SetCountLimit(1, 10000000)
e1:SetCondition(Nef.PendConditionSP()) e1:SetCondition(Nef.PendConditionSP())
e1:SetOperation(Nef.PendOperationSP()) e1:SetOperation(Nef.PendOperationSP())
e1:SetValue(SUMMON_TYPE_PENDULUM) e1:SetValue(SUMMON_TYPE_PENDULUM)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- 由于utility处加载nef,不需要再无效效果 -- 由于utility处加载nef,不需要再无效效果
-- --disable HINTMSG_SPSUMMON -- --disable HINTMSG_SPSUMMON
-- local e2=Effect.CreateEffect(c) -- local e2=Effect.CreateEffect(c)
-- e2:SetType(EFFECT_TYPE_FIELD) -- e2:SetType(EFFECT_TYPE_FIELD)
-- e2:SetRange(LOCATION_PZONE) -- e2:SetRange(LOCATION_PZONE)
-- e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) -- e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
-- e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) -- e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
-- e2:SetTargetRange(1,0) -- e2:SetTargetRange(1,0)
-- e2:SetTarget(Nef.PendSummonLimitTarget) -- e2:SetTarget(Nef.PendSummonLimitTarget)
-- c:RegisterEffect(e2) -- c:RegisterEffect(e2)
--register by default --register by default
if reg==nil or reg then if reg==nil or reg then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(1160) e3:SetDescription(1160)
e3:SetType(EFFECT_TYPE_ACTIVATE) e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
mt.pend_effect1 = e1 mt.pend_effect1 = e1
--mt.pend_effect2 = e2 --mt.pend_effect2 = e2
end end
function Nef.PendSummonCheck(c,e,tp,lscale,rscale,filter,argTable,filter2,argTable2,lpc,rpc) function Nef.PendSummonCheck(c,e,tp,lscale,rscale,filter,argTable,filter2,argTable2,lpc,rpc)
local eset1={lpc:IsHasEffect(10000001)} local eset1={lpc:IsHasEffect(10000001)}
local eset2={rpc:IsHasEffect(10000001)} local eset2={rpc:IsHasEffect(10000001)}
if c:IsType(TYPE_RITUAL) then if c:IsType(TYPE_RITUAL) then
for _,te in ipairs(eset1) do for _,te in ipairs(eset1) do
local mt=Nef.order_table[te:GetValue()] local mt=Nef.order_table[te:GetValue()]
if mt.pend_tag and mt.pend_tag:find("GodSprite") then if mt.pend_tag and mt.pend_tag:find("GodSprite") then
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,true,false) return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,true,false)
end end
end end
for _,te in ipairs(eset2) do for _,te in ipairs(eset2) do
local mt=Nef.order_table[te:GetValue()] local mt=Nef.order_table[te:GetValue()]
if mt.pend_tag and mt.pend_tag:find("GodSprite") then if mt.pend_tag and mt.pend_tag:find("GodSprite") then
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,true,false) return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,true,false)
end end
end end
end end
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false) return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false)
end end
function Nef.PConditionFilterSP(c,e,tp,lscale,rscale,filter,argTable,filter2,argTable2,lpz,rpz) function Nef.PConditionFilterSP(c,e,tp,lscale,rscale,filter,argTable,filter2,argTable2,lpz,rpz)
local lv=0 local lv=0
if c.pendulum_level then if c.pendulum_level then
lv=c.pendulum_level lv=c.pendulum_level
else else
lv=c:GetLevel() lv=c:GetLevel()
end end
local normalCondition = (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM))) local normalCondition = (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)))
and lv>lscale and lv<rscale and not c:IsForbidden() and lv>lscale and lv<rscale and not c:IsForbidden()
and Nef.PendSummonCheck(c,e,tp,lscale,rscale,filter,argTable,filter2,argTable2,lpz,rpz) and Nef.PendSummonCheck(c,e,tp,lscale,rscale,filter,argTable,filter2,argTable2,lpz,rpz)
local spCondition = filter(c,Nef.unpack(argTable)) and filter2(c,Nef.unpack(argTable2)) local spCondition = filter(c,Nef.unpack(argTable)) and filter2(c,Nef.unpack(argTable2))
return spCondition and normalCondition return spCondition and normalCondition
end end
function Nef.PConditionFilterSP2(c,e,tp,lscale,rscale,filter,argTable,filter2,argTable2,lpz,rpz) function Nef.PConditionFilterSP2(c,e,tp,lscale,rscale,filter,argTable,filter2,argTable2,lpz,rpz)
local lv=0 local lv=0
if c.pendulum_level then if c.pendulum_level then
lv=c.pendulum_level lv=c.pendulum_level
else else
lv=c:GetLevel() lv=c:GetLevel()
end end
local normalCondition = lv>lscale and lv<rscale and not c:IsForbidden() local normalCondition = lv>lscale and lv<rscale and not c:IsForbidden()
and Nef.PendSummonCheck(c,e,tp,lscale,rscale,filter,argTable,filter2,argTable2,lpz,rpz) and Nef.PendSummonCheck(c,e,tp,lscale,rscale,filter,argTable,filter2,argTable2,lpz,rpz)
local spCondition = filter(c,Nef.unpack(argTable)) and filter2(c,Nef.unpack(argTable2)) local spCondition = filter(c,Nef.unpack(argTable)) and filter2(c,Nef.unpack(argTable2))
return spCondition and normalCondition return spCondition and normalCondition
end end
function Nef.PendConditionSP() function Nef.PendConditionSP()
return function(e,c,og) return function(e,c,og)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local lpz=Duel.GetFieldCard(tp, LOCATION_PZONE, 0) local lpz=Duel.GetFieldCard(tp, LOCATION_PZONE, 0)
local rpz=Duel.GetFieldCard(tp, LOCATION_PZONE, 1) local rpz=Duel.GetFieldCard(tp, LOCATION_PZONE, 1)
if not (lpz and rpz) then return false end if not (lpz and rpz) then return false end
local n1, filter1, argTable1, tag1, pexfunc1 = Nef.GetPendSPInfo(lpz) local n1, filter1, argTable1, tag1, pexfunc1 = Nef.GetPendSPInfo(lpz)
local n2, filter2, argTable2, tag2, pexfunc2 = Nef.GetPendSPInfo(rpz) local n2, filter2, argTable2, tag2, pexfunc2 = Nef.GetPendSPInfo(rpz)
local lscale=lpz:GetLeftScale() local lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end if lscale>rscale then lscale,rscale=rscale,lscale end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return false end if ft<=0 then return false end
if n1 == 0 or n2 == 0 then return end if n1 == 0 or n2 == 0 then return end
if pexfunc1 and pexfunc1(lpz):IsExists(Nef.PConditionFilterSP2,1,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz) then if pexfunc1 and pexfunc1(lpz):IsExists(Nef.PConditionFilterSP2,1,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz) then
return true return true
end end
if pexfunc2 and pexfunc2(rpz):IsExists(Nef.PConditionFilterSP2,1,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz) then if pexfunc2 and pexfunc2(rpz):IsExists(Nef.PConditionFilterSP2,1,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz) then
return true return true
end end
local loc = 0 local loc = 0
if Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 then loc = loc + LOCATION_HAND end if Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 then loc = loc + LOCATION_HAND end
if Duel.GetLocationCountFromEx(tp, tp, nil, TYPE_PENDULUM) > 0 then loc = loc + LOCATION_EXTRA end if Duel.GetLocationCountFromEx(tp, tp, nil, TYPE_PENDULUM) > 0 then loc = loc + LOCATION_EXTRA end
if loc == 0 then return false end if loc == 0 then return false end
local g = nil local g = nil
if og then if og then
g = og:Filter(Card.IsLocation, nil, loc) g = og:Filter(Card.IsLocation, nil, loc)
return g:IsExists(Nef.PConditionFilterSP,1,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz) return g:IsExists(Nef.PConditionFilterSP,1,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz)
else else
return Duel.IsExistingMatchingCard(Nef.PConditionFilterSP,tp,loc,0,1,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz) return Duel.IsExistingMatchingCard(Nef.PConditionFilterSP,tp,loc,0,1,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz)
end end
end end
end end
function Nef.PendOperationSP() function Nef.PendOperationSP()
return function(e,tp,eg,ep,ev,re,r,rp,c,sg,og) return function(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local lpz = Duel.GetFieldCard(tp, LOCATION_PZONE, 0) local lpz = Duel.GetFieldCard(tp, LOCATION_PZONE, 0)
local rpz = Duel.GetFieldCard(tp, LOCATION_PZONE, 1) local rpz = Duel.GetFieldCard(tp, LOCATION_PZONE, 1)
local n1, filter1, argTable1, tag1, pexfunc1 = Nef.GetPendSPInfo(lpz) local n1, filter1, argTable1, tag1, pexfunc1 = Nef.GetPendSPInfo(lpz)
local n2, filter2, argTable2, tag2, pexfunc2 = Nef.GetPendSPInfo(rpz) local n2, filter2, argTable2, tag2, pexfunc2 = Nef.GetPendSPInfo(rpz)
local lscale = lpz:GetLeftScale() local lscale = lpz:GetLeftScale()
local rscale = rpz:GetRightScale() local rscale = rpz:GetRightScale()
if lscale > rscale then lscale, rscale = rscale, lscale end if lscale > rscale then lscale, rscale = rscale, lscale end
local ft1 = Duel.GetLocationCount(tp, LOCATION_MZONE) local ft1 = Duel.GetLocationCount(tp, LOCATION_MZONE)
local ft2 = Duel.GetLocationCountFromEx(tp, tp, nil, TYPE_PENDULUM) local ft2 = Duel.GetLocationCountFromEx(tp, tp, nil, TYPE_PENDULUM)
local ft = Duel.GetUsableMZoneCount(tp) local ft = Duel.GetUsableMZoneCount(tp)
if Duel.IsPlayerAffectedByEffect(tp, 59822133) then if Duel.IsPlayerAffectedByEffect(tp, 59822133) then
if ft1 > 0 then ft1 = 1 end if ft1 > 0 then ft1 = 1 end
if ft2 > 0 then ft2 = 1 end if ft2 > 0 then ft2 = 1 end
ft = 1 ft = 1
end end
ft = math.min(ft, n1, n2) ft = math.min(ft, n1, n2)
local loc = 0 local loc = 0
if ft1 > 0 then loc = loc + LOCATION_HAND end if ft1 > 0 then loc = loc + LOCATION_HAND end
if ft2 > 0 then loc = loc + LOCATION_EXTRA end if ft2 > 0 then loc = loc + LOCATION_EXTRA end
local exg = Group.CreateGroup() local exg = Group.CreateGroup()
if pexfunc1 then exg:Merge(pexfunc1(lpz)) end if pexfunc1 then exg:Merge(pexfunc1(lpz)) end
if pexfunc2 then exg:Merge(pexfunc2(rpz)) end if pexfunc2 then exg:Merge(pexfunc2(rpz)) end
local tg = nil local tg = nil
if og then if og then
tg=exg:Filter(Nef.PConditionFilterSP2,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz) tg=exg:Filter(Nef.PConditionFilterSP2,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz)
local g2=og:Filter(Card.IsLocation,nil,loc):Filter(Nef.PConditionFilterSP,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz) local g2=og:Filter(Card.IsLocation,nil,loc):Filter(Nef.PConditionFilterSP,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz)
tg:Merge(g2) tg:Merge(g2)
else else
tg=exg:Filter(Nef.PConditionFilterSP2,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz) tg=exg:Filter(Nef.PConditionFilterSP2,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz)
local g2=Duel.GetFieldGroup(tp,loc,0):Filter(Nef.PConditionFilterSP,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz) local g2=Duel.GetFieldGroup(tp,loc,0):Filter(Nef.PConditionFilterSP,nil,e,tp,lscale,rscale,filter1,argTable1,filter2,argTable2,lpz,rpz)
tg:Merge(g2) tg:Merge(g2)
end end
ft1 = math.min(ft1, tg:FilterCount(Card.IsLocation, nil, 0x3ff-LOCATION_EXTRA)) ft1 = math.min(ft1, tg:FilterCount(Card.IsLocation, nil, 0x3ff-LOCATION_EXTRA))
ft2 = math.min(ft2, tg:FilterCount(Card.IsLocation, nil, LOCATION_EXTRA)) ft2 = math.min(ft2, tg:FilterCount(Card.IsLocation, nil, LOCATION_EXTRA))
local ect = c29724053 and Duel.IsPlayerAffectedByEffect(tp, 29724053) and c29724053[tp] local ect = c29724053 and Duel.IsPlayerAffectedByEffect(tp, 29724053) and c29724053[tp]
if ect and ect < ft2 then ft2 = ect end if ect and ect < ft2 then ft2 = ect end
while true do while true do
local ct1 = tg:FilterCount(Card.IsLocation, nil, 0x3ff-LOCATION_EXTRA) local ct1 = tg:FilterCount(Card.IsLocation, nil, 0x3ff-LOCATION_EXTRA)
local ct2 = tg:FilterCount(Card.IsLocation, nil, LOCATION_EXTRA) local ct2 = tg:FilterCount(Card.IsLocation, nil, LOCATION_EXTRA)
local ct = ft local ct = ft
if ct1 > ft1 then ct = math.min(ct, ft1) end if ct1 > ft1 then ct = math.min(ct, ft1) end
if ct2 > ft2 then ct = math.min(ct, ft2) end if ct2 > ft2 then ct = math.min(ct, ft2) end
if ct <= 0 then break end if ct <= 0 then break end
if sg:GetCount() > 0 and not Duel.SelectYesNo(tp, 210) then ft = 0 break end if sg:GetCount() > 0 and not Duel.SelectYesNo(tp, 210) then ft = 0 break end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local g = tg:Select(tp, 1, ct, nil) local g = tg:Select(tp, 1, ct, nil)
tg:Sub(g) tg:Sub(g)
sg:Merge(g) sg:Merge(g)
if g:GetCount() < ct then ft = 0 break end if g:GetCount() < ct then ft = 0 break end
ft = ft - g:GetCount() ft = ft - g:GetCount()
ft1 = ft1 - g:FilterCount(Card.IsLocation, nil, 0x3ff-LOCATION_EXTRA) ft1 = ft1 - g:FilterCount(Card.IsLocation, nil, 0x3ff-LOCATION_EXTRA)
ft2 = ft2 - g:FilterCount(Card.IsLocation, nil, LOCATION_EXTRA) ft2 = ft2 - g:FilterCount(Card.IsLocation, nil, LOCATION_EXTRA)
end end
if ft > 0 then if ft > 0 then
local tg1 = tg:Filter(Card.IsLocation, nil, 0x3ff-LOCATION_EXTRA) local tg1 = tg:Filter(Card.IsLocation, nil, 0x3ff-LOCATION_EXTRA)
local tg2 = tg:Filter(Card.IsLocation, nil, LOCATION_EXTRA) local tg2 = tg:Filter(Card.IsLocation, nil, LOCATION_EXTRA)
if ft1 > 0 and ft2 == 0 and tg1:GetCount() > 0 and (sg:GetCount() == 0 or Duel.SelectYesNo(tp, 210)) then if ft1 > 0 and ft2 == 0 and tg1:GetCount() > 0 and (sg:GetCount() == 0 or Duel.SelectYesNo(tp, 210)) then
local ct = math.min(ft1, ft) local ct = math.min(ft1, ft)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local g = tg1:Select(tp, 1, ct, nil) local g = tg1:Select(tp, 1, ct, nil)
sg:Merge(g) sg:Merge(g)
end end
if ft1 == 0 and ft2 > 0 and tg2:GetCount() > 0 and (sg:GetCount() == 0 or Duel.SelectYesNo(tp, 210)) then if ft1 == 0 and ft2 > 0 and tg2:GetCount() > 0 and (sg:GetCount() == 0 or Duel.SelectYesNo(tp, 210)) then
local ct = math.min(ft2, ft) local ct = math.min(ft2, ft)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local g = tg2:Select(tp, 1, ct, nil) local g = tg2:Select(tp, 1, ct, nil)
sg:Merge(g) sg:Merge(g)
end end
end end
Duel.HintSelection(Group.FromCards(lpz)) Duel.HintSelection(Group.FromCards(lpz))
Duel.HintSelection(Group.FromCards(rpz)) Duel.HintSelection(Group.FromCards(rpz))
end end
end end
function Nef.SetPendMaxNum(c, num, reset_flag, property, reset_count) function Nef.SetPendMaxNum(c, num, reset_flag, property, reset_count)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(10000002) e1:SetCode(10000002)
local property=property or 0 local property=property or 0
e1:SetProperty(bit.bor(property,EFFECT_FLAG_CANNOT_DISABLE)) e1:SetProperty(bit.bor(property,EFFECT_FLAG_CANNOT_DISABLE))
e1:SetValue(num) e1:SetValue(num)
if reset_flag then if reset_flag then
e1:SetReset(reset_flag,reset_count) e1:SetReset(reset_flag,reset_count)
end end
c:RegisterEffect(e1,true) c:RegisterEffect(e1,true)
end end
function Nef.SetPendExTarget(c, filter_func) function Nef.SetPendExTarget(c, filter_func)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(10000003) e2:SetCode(10000003)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetValue(filter_func) e2:SetValue(filter_func)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function Nef.GetPendMaxNum(c) function Nef.GetPendMaxNum(c)
local ret=0 local ret=0
local eset={c:IsHasEffect(10000002)} local eset={c:IsHasEffect(10000002)}
for _,te in ipairs(eset) do for _,te in ipairs(eset) do
local v=te:GetValue() local v=te:GetValue()
if v and type(v)=="number" then ret=math.max(ret,v) end if v and type(v)=="number" then ret=math.max(ret,v) end
end end
return ret return ret
end end
function Nef.GetPendSPInfo(c) function Nef.GetPendSPInfo(c)
local eset={c:IsHasEffect(10000001)} local eset={c:IsHasEffect(10000001)}
local eset_ex={c:IsHasEffect(10000003)} local eset_ex={c:IsHasEffect(10000003)}
local pend_num = 99 local pend_num = 99
local pend_filter = Auxiliary.TRUE local pend_filter = Auxiliary.TRUE
local pend_arg = {1} local pend_arg = {1}
local pend_tag = "" local pend_tag = ""
local pend_extra_func = function() return Group.CreateGroup() end local pend_extra_func = function() return Group.CreateGroup() end
for _,te in ipairs(eset) do for _,te in ipairs(eset) do
local mt=Nef.order_table[te:GetValue()] local mt=Nef.order_table[te:GetValue()]
if mt then if mt then
if mt.pend_num then if mt.pend_num then
local pnum = type(mt.pend_num) == "number" and mt.pend_num or mt.pend_num(c) local pnum = type(mt.pend_num) == "number" and mt.pend_num or mt.pend_num(c)
pend_num = math.min(pend_num, pnum) pend_num = math.min(pend_num, pnum)
end end
if mt.pend_filter then if mt.pend_filter then
local f1=pend_filter local f1=pend_filter
local arg=mt.pend_arg or {1} local arg=mt.pend_arg or {1}
local f2_ori=mt.pend_filter local f2_ori=mt.pend_filter
local f2=function(c) local f2=function(c)
return not f2_ori or f2_ori(c,table.unpack(arg)) return not f2_ori or f2_ori(c,table.unpack(arg))
end end
pend_filter=function(c) return f1(c) and f2(c) end pend_filter=function(c) return f1(c) and f2(c) end
end end
pend_arg=mt.pend_arg or pend_arg pend_arg=mt.pend_arg or pend_arg
pend_tag=mt.pend_tag and pend_tag..mt.pend_tag or pend_tag pend_tag=mt.pend_tag and pend_tag..mt.pend_tag or pend_tag
end end
end end
for _,te in ipairs(eset_ex) do for _,te in ipairs(eset_ex) do
local f=te:GetValue() local f=te:GetValue()
local oldf=pend_extra_func local oldf=pend_extra_func
pend_extra_func=function(...) pend_extra_func=function(...)
local g=oldf(...) local g=oldf(...)
g:Merge(f(...)) g:Merge(f(...))
return g return g
end end
end end
local max_pend_num = Nef.GetPendMaxNum(c) local max_pend_num = Nef.GetPendMaxNum(c)
if max_pend_num>0 then pend_num = math.min(pend_num,max_pend_num) end if max_pend_num>0 then pend_num = math.min(pend_num,max_pend_num) end
return pend_num, pend_filter, pend_arg, pend_tag, pend_extra_func return pend_num, pend_filter, pend_arg, pend_tag, pend_extra_func
end end
function Nef.GetFieldLeftScale(tp) function Nef.GetFieldLeftScale(tp)
local lpz=Duel.GetFieldCard(tp, LOCATION_PZONE, 0) local lpz=Duel.GetFieldCard(tp, LOCATION_PZONE, 0)
if lpz then if lpz then
return lpz:GetLeftScale() return lpz:GetLeftScale()
else else
return return
end end
end end
function Nef.GetFieldRightScale(tp) function Nef.GetFieldRightScale(tp)
local rpz=Duel.GetFieldCard(tp, LOCATION_PZONE, 1) local rpz=Duel.GetFieldCard(tp, LOCATION_PZONE, 1)
if rpz then if rpz then
return rpz:GetRightScale() return rpz:GetRightScale()
else else
return return
end end
end end
-- function Nef.PendSummonLimitTarget(e,c,sump,sumtype,sumpos,targetp) -- function Nef.PendSummonLimitTarget(e,c,sump,sumtype,sumpos,targetp)
-- local c = nil -- local c = nil
-- if e then c = e:GetHandler() end -- if e then c = e:GetHandler() end
-- return c and sumtype==SUMMON_TYPE_PENDULUM and _G["c" .. c:GetOriginalCode()].pend_filter==nil -- return c and sumtype==SUMMON_TYPE_PENDULUM and _G["c" .. c:GetOriginalCode()].pend_filter==nil
-- and (c == Duel.GetFieldCard(tp,LOCATION_SZONE, 6) or c == Duel.GetFieldCard(tp,LOCATION_SZONE, 7)) -- and (c == Duel.GetFieldCard(tp,LOCATION_SZONE, 6) or c == Duel.GetFieldCard(tp,LOCATION_SZONE, 7))
-- end -- end
function Nef.EnableDualAttributeSP(c) function Nef.EnableDualAttributeSP(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DUAL_SUMMONABLE) e1:SetCode(EFFECT_DUAL_SUMMONABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function Nef.EnableDualAttribute(c, flag) function Nef.EnableDualAttribute(c, flag)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DUAL_SUMMONABLE) e1:SetCode(EFFECT_DUAL_SUMMONABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_TYPE) e2:SetCode(EFFECT_CHANGE_TYPE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(aux.DualNormalCondition) e2:SetCondition(aux.DualNormalCondition)
e2:SetValue(TYPE_NORMAL+TYPE_DUAL+TYPE_MONSTER+flag) e2:SetValue(TYPE_NORMAL+TYPE_DUAL+TYPE_MONSTER+flag)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function Nef.IsDate(Year, Month, Day) function Nef.IsDate(Year, Month, Day)
local year = Year or -1 local year = Year or -1
local month = Month or -1 local month = Month or -1
local day = Day or -1 local day = Day or -1
local date = os.date("*t") local date = os.date("*t")
return (date.year==year or year<0) and (date.month==month or month<0) and (date.day==day or day<0) return (date.year==year or year<0) and (date.month==month or month<0) and (date.day==day or day<0)
end end
function Nef.GetDate() function Nef.GetDate()
local date = os.date("*t") local date = os.date("*t")
return date.year, date.month, date.day return date.year, date.month, date.day
end end
function Nef.Log(message) function Nef.Log(message)
-- if AI and AI.Chat ~= nil then AI.Chat(message) end -- if AI and AI.Chat ~= nil then AI.Chat(message) end
end end
function Nef.LogFormat(fmt, ...) function Nef.LogFormat(fmt, ...)
Debug.Message(string.format(fmt, ...)) Debug.Message(string.format(fmt, ...))
end end
function Nef.GetRandomCardCode(num, command) function Nef.GetRandomCardCode(num, command)
-- local result = {} -- local result = {}
-- local commandList = { -- local commandList = {
-- [0] = "Main", -- [0] = "Main",
-- [1] = "Extra" -- [1] = "Extra"
-- } -- }
-- local cardType = commandList[command] -- local cardType = commandList[command]
-- for i=1,num do -- for i=1,num do
-- local r = math.random(1,#CardList[cardType]) -- local r = math.random(1,#CardList[cardType])
-- result[i] = CardList[cardType][r] -- result[i] = CardList[cardType][r]
-- end -- end
-- return result -- return result
end end
function Nef.kangbazi(e,te) function Nef.kangbazi(e,te)
if te:IsActiveType(TYPE_MONSTER) and te:IsActivated() then if te:IsActiveType(TYPE_MONSTER) and te:IsActivated() then
local ec=te:GetOwner() local ec=te:GetOwner()
if ec:IsType(TYPE_XYZ) then if ec:IsType(TYPE_XYZ) then
return ec:GetOriginalRank()<=10 and ec:GetOriginalRank()>=4 return ec:GetOriginalRank()<=10 and ec:GetOriginalRank()>=4
else else
return ec:GetOriginalLevel()<=10 and ec:GetOriginalLevel()>=4 return ec:GetOriginalLevel()<=10 and ec:GetOriginalLevel()>=4
end end
else else
return false return false
end end
end end
Nef.order_table=Nef.order_table or {} Nef.order_table=Nef.order_table or {}
Nef.order_count=Nef.order_count or 0 Nef.order_count=Nef.order_count or 0
function Nef.order_table_new(v) function Nef.order_table_new(v)
Nef.order_count=Nef.order_count+1 Nef.order_count=Nef.order_count+1
Nef.order_table[Nef.order_count]=v Nef.order_table[Nef.order_count]=v
return Nef.order_count return Nef.order_count
end end
function Nef.CheckGroupRecursive(c,sg,g,f,min,max,ext_params) function Nef.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
sg:AddCard(c) sg:AddCard(c)
local ct=sg:GetCount() local ct=sg:GetCount()
local res=(ct>=min and ct<=max and f(sg,table.unpack(ext_params))) local res=(ct>=min and ct<=max and f(sg,table.unpack(ext_params)))
or (ct<max and g:IsExists(Nef.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params)) or (ct<max and g:IsExists(Nef.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params))
sg:RemoveCard(c) sg:RemoveCard(c)
return res return res
end end
function Nef.CheckGroup(g,f,cg,min,max,...) function Nef.CheckGroup(g,f,cg,min,max,...)
local min=min or 1 local min=min or 1
local max=max or g:GetCount() local max=max or g:GetCount()
if min>max then return false end if min>max then return false end
local ext_params={...} local ext_params={...}
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end if cg then sg:Merge(cg) end
local ct=sg:GetCount() local ct=sg:GetCount()
if ct>=min and ct<=max and f(sg,...) then return true end if ct>=min and ct<=max and f(sg,...) then return true end
return g:IsExists(Nef.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params) return g:IsExists(Nef.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params)
end end
function Nef.SelectGroup(tp,desc,g,f,cg,min,max,...) function Nef.SelectGroup(tp,desc,g,f,cg,min,max,...)
local min=min or 1 local min=min or 1
local max=max or g:GetCount() local max=max or g:GetCount()
local ext_params={...} local ext_params={...}
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local cg=cg or Group.CreateGroup() local cg=cg or Group.CreateGroup()
sg:Merge(cg) sg:Merge(cg)
local ct=sg:GetCount() local ct=sg:GetCount()
local ag=g:Filter(Nef.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params) local ag=g:Filter(Nef.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
while ct<max and ag:GetCount()>0 do while ct<max and ag:GetCount()>0 do
local finish=(ct>=min and ct<=max and f(sg,...)) local finish=(ct>=min and ct<=max and f(sg,...))
local seg=sg:Clone() local seg=sg:Clone()
local dmin=min-cg:GetCount() local dmin=min-cg:GetCount()
local dmax=math.min(max-cg:GetCount(),g:GetCount()) local dmax=math.min(max-cg:GetCount(),g:GetCount())
seg:Sub(cg) seg:Sub(cg)
Duel.Hint(HINT_SELECTMSG,tp,desc) Duel.Hint(HINT_SELECTMSG,tp,desc)
local tc=ag:SelectUnselect(seg,tp,finish,finish,dmin,dmax) local tc=ag:SelectUnselect(seg,tp,finish,finish,dmin,dmax)
if not tc then break end if not tc then break end
if sg:IsContains(tc) then if sg:IsContains(tc) then
sg:RemoveCard(tc) sg:RemoveCard(tc)
else else
sg:AddCard(tc) sg:AddCard(tc)
end end
ct=sg:GetCount() ct=sg:GetCount()
ag=g:Filter(Nef.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params) ag=g:Filter(Nef.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
end end
return sg return sg
end end
function Nef.SelectGroupWithCancel(tp,desc,g,f,cg,min,max,...) function Nef.SelectGroupWithCancel(tp,desc,g,f,cg,min,max,...)
local min=min or 1 local min=min or 1
local max=max or g:GetCount() local max=max or g:GetCount()
local ext_params={...} local ext_params={...}
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local cg=cg or Group.CreateGroup() local cg=cg or Group.CreateGroup()
sg:Merge(cg) sg:Merge(cg)
local ct=sg:GetCount() local ct=sg:GetCount()
local ag=g:Filter(Nef.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params) local ag=g:Filter(Nef.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
while ct<max and ag:GetCount()>0 do while ct<max and ag:GetCount()>0 do
local finish=(ct>=min and ct<=max and f(sg,...)) local finish=(ct>=min and ct<=max and f(sg,...))
local cancel=finish or ct==0 local cancel=finish or ct==0
local seg=sg:Clone() local seg=sg:Clone()
local dmin=min-cg:GetCount() local dmin=min-cg:GetCount()
local dmax=math.min(max-cg:GetCount(),g:GetCount()) local dmax=math.min(max-cg:GetCount(),g:GetCount())
seg:Sub(cg) seg:Sub(cg)
Duel.Hint(HINT_SELECTMSG,tp,desc) Duel.Hint(HINT_SELECTMSG,tp,desc)
local tc=ag:SelectUnselect(seg,tp,finish,cancel,dmin,dmax) local tc=ag:SelectUnselect(seg,tp,finish,cancel,dmin,dmax)
if not tc then if not tc then
if not finish then return end if not finish then return end
break break
end end
if sg:IsContains(tc) then if sg:IsContains(tc) then
sg:RemoveCard(tc) sg:RemoveCard(tc)
else else
sg:AddCard(tc) sg:AddCard(tc)
end end
ct=sg:GetCount() ct=sg:GetCount()
ag=g:Filter(Nef.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params) ag=g:Filter(Nef.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
end end
return sg return sg
end end
function Nef.OverlayCard(c,tc,xm,nchk) function Nef.OverlayCard(c,tc,xm,nchk)
if not nchk and (not c:IsLocation(LOCATION_MZONE) or c:IsFacedown() or not c:IsType(TYPE_XYZ) or tc:IsType(TYPE_TOKEN)) then return end if not nchk and (not c:IsLocation(LOCATION_MZONE) or c:IsFacedown() or not c:IsType(TYPE_XYZ) or tc:IsType(TYPE_TOKEN)) then return end
if tc:IsStatus(STATUS_LEAVE_CONFIRMED) then if tc:IsStatus(STATUS_LEAVE_CONFIRMED) then
tc:CancelToGrave() tc:CancelToGrave()
end end
if tc:GetOverlayCount()>0 then if tc:GetOverlayCount()>0 then
local og=tc:GetOverlayGroup() local og=tc:GetOverlayGroup()
if xm then if xm then
Duel.Overlay(c,og) Duel.Overlay(c,og)
else else
Duel.SendtoGrave(og,REASON_RULE) Duel.SendtoGrave(og,REASON_RULE)
end end
end end
Duel.Overlay(c,tc) Duel.Overlay(c,tc)
end end
function Nef.OverlayFilter(c,nchk) function Nef.OverlayFilter(c,nchk)
return nchk or not c:IsType(TYPE_TOKEN) return nchk or not c:IsType(TYPE_TOKEN)
end end
function Nef.OverlayGroup(c,g,xm,nchk) function Nef.OverlayGroup(c,g,xm,nchk)
if not nchk and (not c:IsLocation(LOCATION_MZONE) or c:IsFacedown() or g:GetCount()<=0 or not c:IsType(TYPE_XYZ)) then return end if not nchk and (not c:IsLocation(LOCATION_MZONE) or c:IsFacedown() or g:GetCount()<=0 or not c:IsType(TYPE_XYZ)) then return end
local tg=g:Filter(Nef.OverlayFilter,nil,nchk) local tg=g:Filter(Nef.OverlayFilter,nil,nchk)
if tg:GetCount()==0 then return end if tg:GetCount()==0 then return end
local og=Group.CreateGroup() local og=Group.CreateGroup()
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
if tc:IsStatus(STATUS_LEAVE_CONFIRMED) then if tc:IsStatus(STATUS_LEAVE_CONFIRMED) then
tc:CancelToGrave() tc:CancelToGrave()
end end
og:Merge(tc:GetOverlayGroup()) og:Merge(tc:GetOverlayGroup())
end end
if og:GetCount()>0 then if og:GetCount()>0 then
if xm then if xm then
Duel.Overlay(c,og) Duel.Overlay(c,og)
else else
Duel.SendtoGrave(og,REASON_RULE) Duel.SendtoGrave(og,REASON_RULE)
end end
end end
Duel.Overlay(c,tg) Duel.Overlay(c,tg)
end end
function Nef.CheckFieldFilter(g,tp,c,f,...) function Nef.CheckFieldFilter(g,tp,c,f,...)
return Duel.GetLocationCountFromEx(tp,tp,g,c)>0 and (not f or f(g,...)) return Duel.GetLocationCountFromEx(tp,tp,g,c)>0 and (not f or f(g,...))
end end
function Nef.AddXyzProcedureCustom(c,func,gf,minc,maxc,xm,...) function Nef.AddXyzProcedureCustom(c,func,gf,minc,maxc,xm,...)
local ext_params={...} local ext_params={...}
if c.xyz_filter==nil then if c.xyz_filter==nil then
local code=c:GetOriginalCode() local code=c:GetOriginalCode()
local mt=_G["c" .. code] local mt=_G["c" .. code]
mt.xyz_filter=func or aux.TRUE mt.xyz_filter=func or aux.TRUE
mt.xyz_count=minc mt.xyz_count=minc
end end
local maxc=maxc or minc local maxc=maxc or minc
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(Nef.XyzProcedureCustomCondition(func,gf,minc,maxc,ext_params)) e1:SetCondition(Nef.XyzProcedureCustomCondition(func,gf,minc,maxc,ext_params))
e1:SetTarget(Nef.XyzProcedureCustomTarget(func,gf,minc,maxc,ext_params)) e1:SetTarget(Nef.XyzProcedureCustomTarget(func,gf,minc,maxc,ext_params))
e1:SetOperation(Nef.XyzProcedureCustomOperation(xm)) e1:SetOperation(Nef.XyzProcedureCustomOperation(xm))
e1:SetValue(SUMMON_TYPE_XYZ) e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1) c:RegisterEffect(e1)
return e1 return e1
end end
function Nef.XyzProcedureCustomTuneMagicianFilter(c,te) function Nef.XyzProcedureCustomTuneMagicianFilter(c,te)
local f=te:GetValue() local f=te:GetValue()
return f(te,c) return f(te,c)
end end
function Nef.XyzProcedureCustomTuneMagicianCheck(c,g) function Nef.XyzProcedureCustomTuneMagicianCheck(c,g)
local eset={c:IsHasEffect(EFFECT_TUNE_MAGICIAN_X)} local eset={c:IsHasEffect(EFFECT_TUNE_MAGICIAN_X)}
for _,te in ipairs(eset) do for _,te in ipairs(eset) do
if g:IsExists(Nef.XyzProcedureCustomTuneMagicianFilter,1,c,te) then return true end if g:IsExists(Nef.XyzProcedureCustomTuneMagicianFilter,1,c,te) then return true end
end end
return false return false
end end
function Nef.XyzProcedureCustomCheck(g,xyzc,tp,gf) function Nef.XyzProcedureCustomCheck(g,xyzc,tp,gf)
if g:IsExists(Nef.XyzProcedureCustomTuneMagicianCheck,1,nil,g) then return false end if g:IsExists(Nef.XyzProcedureCustomTuneMagicianCheck,1,nil,g) then return false end
return not gf or gf(g,xyzc,tp) return not gf or gf(g,xyzc,tp)
end end
function Nef.XyzProcedureCustomFilter(c,xyzcard,func,ext_params) function Nef.XyzProcedureCustomFilter(c,xyzcard,func,ext_params)
if c:IsLocation(LOCATION_ONFIELD+LOCATION_REMOVED) and c:IsFacedown() then return false end if c:IsLocation(LOCATION_ONFIELD+LOCATION_REMOVED) and c:IsFacedown() then return false end
return c:IsCanBeXyzMaterial(xyzcard) and (not func or func(c,xyzcard,table.unpack(ext_params))) return c:IsCanBeXyzMaterial(xyzcard) and (not func or func(c,xyzcard,table.unpack(ext_params)))
end end
function Nef.XyzProcedureCustomCondition(func,gf,minct,maxct,ext_params) function Nef.XyzProcedureCustomCondition(func,gf,minct,maxct,ext_params)
return function(e,c,og,min,max) return function(e,c,og,min,max)
if c==nil then return true end if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler() local tp=c:GetControler()
local minc=minct or 2 local minc=minct or 2
local maxc=maxct or minct or 63 local maxc=maxct or minct or 63
if min then if min then
minc=math.max(minc,min) minc=math.max(minc,min)
maxc=math.min(maxc,max) maxc=math.min(maxc,max)
end end
local mg=nil local mg=nil
if og then if og then
mg=og:Filter(Nef.XyzProcedureCustomFilter,nil,c,func,ext_params) mg=og:Filter(Nef.XyzProcedureCustomFilter,nil,c,func,ext_params)
else else
mg=Duel.GetMatchingGroup(Nef.XyzProcedureCustomFilter,tp,LOCATION_MZONE,0,nil,c,func,ext_params) mg=Duel.GetMatchingGroup(Nef.XyzProcedureCustomFilter,tp,LOCATION_MZONE,0,nil,c,func,ext_params)
end end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_XMATERIAL)} local ce={Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_XMATERIAL)}
for _,te in ipairs(ce) do for _,te in ipairs(ce) do
local tc=te:GetHandler() local tc=te:GetHandler()
if not mg:IsContains(tc) then return false end if not mg:IsContains(tc) then return false end
sg:AddCard(tc) sg:AddCard(tc)
end end
return maxc>=minc and Nef.CheckGroup(mg,Nef.CheckFieldFilter,sg,minc,maxc,tp,c,Nef.XyzProcedureCustomCheck,c,tp,gf) return maxc>=minc and Nef.CheckGroup(mg,Nef.CheckFieldFilter,sg,minc,maxc,tp,c,Nef.XyzProcedureCustomCheck,c,tp,gf)
end end
end end
function Nef.XyzProcedureCustomTarget(func,gf,minct,maxct,ext_params) function Nef.XyzProcedureCustomTarget(func,gf,minct,maxct,ext_params)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max) return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
local g=nil local g=nil
if og and not min then if og and not min then
g=og g=og
else else
local mg=nil local mg=nil
if og then if og then
mg=og:Filter(Nef.XyzProcedureCustomFilter,nil,c,func,ext_params) mg=og:Filter(Nef.XyzProcedureCustomFilter,nil,c,func,ext_params)
else else
mg=Duel.GetMatchingGroup(Nef.XyzProcedureCustomFilter,tp,LOCATION_MZONE,0,nil,c,func,ext_params) mg=Duel.GetMatchingGroup(Nef.XyzProcedureCustomFilter,tp,LOCATION_MZONE,0,nil,c,func,ext_params)
end end
local minc=minct or 2 local minc=minct or 2
local maxc=maxct or minct or 63 local maxc=maxct or minct or 63
if min then if min then
minc=math.max(minc,min) minc=math.max(minc,min)
maxc=math.min(maxc,max) maxc=math.min(maxc,max)
end end
local ce={Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_XMATERIAL)} local ce={Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_XMATERIAL)}
for _,te in ipairs(ce) do for _,te in ipairs(ce) do
local tc=te:GetHandler() local tc=te:GetHandler()
sg:AddCard(tc) sg:AddCard(tc)
end end
g=Nef.SelectGroupWithCancel(tp,HINTMSG_XMATERIAL,mg,Nef.CheckFieldFilter,sg,minc,maxc,tp,c,Nef.XyzProcedureCustomCheck,c,tp,gf) g=Nef.SelectGroupWithCancel(tp,HINTMSG_XMATERIAL,mg,Nef.CheckFieldFilter,sg,minc,maxc,tp,c,Nef.XyzProcedureCustomCheck,c,tp,gf)
end end
if g then if g then
g:KeepAlive() g:KeepAlive()
e:SetLabelObject(g) e:SetLabelObject(g)
return true return true
else return false end else return false end
end end
end end
function Nef.XyzProcedureCustomOperation(xm) function Nef.XyzProcedureCustomOperation(xm)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max) return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
local g=e:GetLabelObject() local g=e:GetLabelObject()
c:SetMaterial(g) c:SetMaterial(g)
Nef.OverlayGroup(c,g,xm,true) Nef.OverlayGroup(c,g,xm,true)
g:DeleteGroup() g:DeleteGroup()
end end
end end
function Nef.CommonCounterGroup(c, code) function Nef.CommonCounterGroup(c, code)
Nef.ccg = Nef.ccg or {} Nef.ccg = Nef.ccg or {}
Nef.counter = Nef.counter or {[0] = {}, [1] = {},} Nef.counter = Nef.counter or {[0] = {}, [1] = {},}
if not Nef.ccg[code] then if not Nef.ccg[code] then
Nef.ccg[code] = Group.CreateGroup() Nef.ccg[code] = Group.CreateGroup()
Nef.ccg[code]:KeepAlive() Nef.ccg[code]:KeepAlive()
Nef.counter[0][code] = 0 Nef.counter[0][code] = 0
Nef.counter[1][code] = 0 Nef.counter[1][code] = 0
end end
if not Nef.ccg[code]:IsContains(c) then if not Nef.ccg[code]:IsContains(c) then
Nef.ccg[code]:AddCard(c) Nef.ccg[code]:AddCard(c)
end end
end end
function Nef.AddCommonCounter(num, code, tp) function Nef.AddCommonCounter(num, code, tp)
if not tp then if not tp then
Nef.AddCommonCounter(num, code, 0) Nef.AddCommonCounter(num, code, 0)
Nef.AddCommonCounter(num, code, 1) Nef.AddCommonCounter(num, code, 1)
return return
end end
if Nef.ccg[code] then if Nef.ccg[code] then
Nef.counter[tp][code] = Nef.counter[tp][code] + num Nef.counter[tp][code] = Nef.counter[tp][code] + num
if Nef.counter[tp][code] < 0 then Nef.counter[tp][code] = 0 end if Nef.counter[tp][code] < 0 then Nef.counter[tp][code] = 0 end
local tag = math.min(Nef.counter[tp][code], 11) local tag = math.min(Nef.counter[tp][code], 11)
local tc = Nef.ccg[code]:GetFirst() local tc = Nef.ccg[code]:GetFirst()
while tc do while tc do
if tc:IsControler(tp) then if tc:IsControler(tp) then
tc:ResetFlagEffect(999900+code) tc:ResetFlagEffect(999900+code)
if tc:IsLocation(LOCATION_ONFIELD) and tag > 0 then if tc:IsLocation(LOCATION_ONFIELD) and tag > 0 then
tc:RegisterFlagEffect(999900+code, RESET_EVENT+0xfe0000, EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE, 0, 0, tc:RegisterFlagEffect(999900+code, RESET_EVENT+0xfe0000, EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE, 0, 0,
aux.Stringid(code, tag)) aux.Stringid(code, tag))
end end
end end
tc = Nef.ccg[code]:GetNext() tc = Nef.ccg[code]:GetNext()
end end
end end
end end
function Nef.SetCommonCounter(num, code, tp) function Nef.SetCommonCounter(num, code, tp)
if not tp then if not tp then
Nef.SetCommonCounter(num, code, 0) Nef.SetCommonCounter(num, code, 0)
Nef.SetCommonCounter(num, code, 1) Nef.SetCommonCounter(num, code, 1)
return return
end end
if Nef.ccg[code] then if Nef.ccg[code] then
Nef.counter[tp][code] = num Nef.counter[tp][code] = num
Nef.AddCommonCounter(0, code, tp) Nef.AddCommonCounter(0, code, tp)
end end
end end
function Nef.GetCommonCounter(code, tp) function Nef.GetCommonCounter(code, tp)
local result = 0 local result = 0
if Nef.counter[tp] then if Nef.counter[tp] then
result = Nef.counter[tp][code] or 0 result = Nef.counter[tp][code] or 0
end end
return result return result
end end
function Nef.RefreshCommonCounter(c, code) function Nef.RefreshCommonCounter(c, code)
local tag = math.min(Nef.counter[c:GetControler()][code], 11) local tag = math.min(Nef.counter[c:GetControler()][code], 11)
c:ResetFlagEffect(999900+code) c:ResetFlagEffect(999900+code)
if tag > 0 then if tag > 0 then
c:RegisterFlagEffect(999900+code, RESET_EVENT+0xfe0000, EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE, 0, 0, c:RegisterFlagEffect(999900+code, RESET_EVENT+0xfe0000, EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE, 0, 0,
aux.Stringid(code, tag)) aux.Stringid(code, tag))
end end
end end
function Nef.AddSummonMusic(c,desc,stype) function Nef.AddSummonMusic(c,desc,stype)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
if stype then if stype then
e1:SetCondition(Nef.SummonTypeCondition(stype)) e1:SetCondition(Nef.SummonTypeCondition(stype))
end end
e1:SetOperation(function() e1:SetOperation(function()
Duel.Hint(11,0,desc) Duel.Hint(11,0,desc)
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e1:Clone() local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function Nef.AddLinkProcedureWithDesc(c,f,min,max,gf,desc) function Nef.AddLinkProcedureWithDesc(c,f,min,max,gf,desc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetDescription(desc or 1166) e1:SetDescription(desc or 1166)
if max==nil then max=c:GetLink() end if max==nil then max=c:GetLink() end
e1:SetCondition(Auxiliary.LinkCondition(f,min,max,gf)) e1:SetCondition(Auxiliary.LinkCondition(f,min,max,gf))
e1:SetTarget(Auxiliary.LinkTarget(f,min,max,gf)) e1:SetTarget(Auxiliary.LinkTarget(f,min,max,gf))
e1:SetOperation(Auxiliary.LinkOperation(f,min,max,gf)) e1:SetOperation(Auxiliary.LinkOperation(f,min,max,gf))
e1:SetValue(SUMMON_TYPE_LINK) e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1) c:RegisterEffect(e1)
return e1 return e1
end end
function Nef.DeepCopy(tbl) function Nef.DeepCopy(tbl)
local t = {} local t = {}
for k, v in pairs(tbl) do for k, v in pairs(tbl) do
if type(v) == "table" then if type(v) == "table" then
t[k] = Nef.DeepCopy(v) t[k] = Nef.DeepCopy(v)
else else
t[k] = v t[k] = v
end end
end end
return t return t
end end
function Nef.GetAllArrow(c) function Nef.GetAllArrow(c)
local res = {} local res = {}
local list = { local list = {
LINK_MARKER_BOTTOM_LEFT, LINK_MARKER_BOTTOM_LEFT,
LINK_MARKER_BOTTOM, LINK_MARKER_BOTTOM,
LINK_MARKER_BOTTOM_RIGHT, LINK_MARKER_BOTTOM_RIGHT,
LINK_MARKER_LEFT, LINK_MARKER_LEFT,
LINK_MARKER_RIGHT, LINK_MARKER_RIGHT,
LINK_MARKER_TOP_LEFT, LINK_MARKER_TOP_LEFT,
LINK_MARKER_TOP, LINK_MARKER_TOP,
LINK_MARKER_TOP_RIGHT, LINK_MARKER_TOP_RIGHT,
} }
for i = 1, #list do for i = 1, #list do
if c:IsLinkMarker(list[i]) then if c:IsLinkMarker(list[i]) then
res[#res+1] = list[i] res[#res+1] = list[i]
end end
end end
return res return res
end end
-- this group include cards in szone -- this group include cards in szone
function Nef.GetLinkArrowGroup(c) function Nef.GetLinkArrowGroup(c)
local g = Group.CreateGroup() local g = Group.CreateGroup()
if c:IsOnField() then if c:IsOnField() then
local tp = c:GetControler() local tp = c:GetControler()
local loc = c:GetLocation() local loc = c:GetLocation()
local seq = c:GetSequence() local seq = c:GetSequence()
if c:IsLinkMarker(LINK_MARKER_TOP) then if c:IsLinkMarker(LINK_MARKER_TOP) then
local tc = Nef.getDir8CardByPos(tp, loc, seq) local tc = Nef.getDir8CardByPos(tp, loc, seq)
if tc then g:AddCard(tc) end if tc then g:AddCard(tc) end
end end
if c:IsLinkMarker(LINK_MARKER_TOP_LEFT) then if c:IsLinkMarker(LINK_MARKER_TOP_LEFT) then
local tc = Nef.getDir7CardByPos(tp, loc, seq) local tc = Nef.getDir7CardByPos(tp, loc, seq)
if tc then g:AddCard(tc) end if tc then g:AddCard(tc) end
end end
if c:IsLinkMarker(LINK_MARKER_TOP_RIGHT) then if c:IsLinkMarker(LINK_MARKER_TOP_RIGHT) then
local tc = Nef.getDir9CardByPos(tp, loc, seq) local tc = Nef.getDir9CardByPos(tp, loc, seq)
if tc then g:AddCard(tc) end if tc then g:AddCard(tc) end
end end
if c:IsLinkMarker(LINK_MARKER_LEFT) then if c:IsLinkMarker(LINK_MARKER_LEFT) then
local tc = Nef.getDir4CardByPos(tp, loc, seq) local tc = Nef.getDir4CardByPos(tp, loc, seq)
if tc then g:AddCard(tc) end if tc then g:AddCard(tc) end
end end
if c:IsLinkMarker(LINK_MARKER_RIGHT) then if c:IsLinkMarker(LINK_MARKER_RIGHT) then
local tc = Nef.getDir6CardByPos(tp, loc, seq) local tc = Nef.getDir6CardByPos(tp, loc, seq)
if tc then g:AddCard(tc) end if tc then g:AddCard(tc) end
end end
if c:IsLinkMarker(LINK_MARKER_BOTTOM) then if c:IsLinkMarker(LINK_MARKER_BOTTOM) then
local tc = Nef.getDir2CardByPos(tp, loc, seq) local tc = Nef.getDir2CardByPos(tp, loc, seq)
if tc then g:AddCard(tc) end if tc then g:AddCard(tc) end
end end
if c:IsLinkMarker(LINK_MARKER_BOTTOM_LEFT) then if c:IsLinkMarker(LINK_MARKER_BOTTOM_LEFT) then
local tc = Nef.getDir1CardByPos(tp, loc, seq) local tc = Nef.getDir1CardByPos(tp, loc, seq)
if tc then g:AddCard(tc) end if tc then g:AddCard(tc) end
end end
if c:IsLinkMarker(LINK_MARKER_BOTTOM_RIGHT) then if c:IsLinkMarker(LINK_MARKER_BOTTOM_RIGHT) then
local tc = Nef.getDir3CardByPos(tp, loc, seq) local tc = Nef.getDir3CardByPos(tp, loc, seq)
if tc then g:AddCard(tc) end if tc then g:AddCard(tc) end
end end
end end
return g return g
end end
function Nef.getDir8CardByPos(tp, loc, seq) function Nef.getDir8CardByPos(tp, loc, seq)
if loc == LOCATION_MZONE then if loc == LOCATION_MZONE then
if seq == 1 then if seq == 1 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, 5) return Duel.GetFieldCard(tp, LOCATION_MZONE, 5)
elseif seq == 3 then elseif seq == 3 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, 6) return Duel.GetFieldCard(tp, LOCATION_MZONE, 6)
elseif seq == 5 then elseif seq == 5 then
return Duel.GetFieldCard(1-tp, LOCATION_MZONE, 3) return Duel.GetFieldCard(1-tp, LOCATION_MZONE, 3)
elseif seq == 6 then elseif seq == 6 then
return Duel.GetFieldCard(1-tp, LOCATION_MZONE, 1) return Duel.GetFieldCard(1-tp, LOCATION_MZONE, 1)
end end
else else
return Duel.GetFieldCard(tp, LOCATION_MZONE, seq) return Duel.GetFieldCard(tp, LOCATION_MZONE, seq)
end end
end end
function Nef.getDir7CardByPos(tp, loc, seq) function Nef.getDir7CardByPos(tp, loc, seq)
if loc == LOCATION_MZONE then if loc == LOCATION_MZONE then
if seq == 2 then if seq == 2 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, 5) return Duel.GetFieldCard(tp, LOCATION_MZONE, 5)
elseif seq == 4 then elseif seq == 4 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, 6) return Duel.GetFieldCard(tp, LOCATION_MZONE, 6)
elseif seq == 5 then elseif seq == 5 then
return Duel.GetFieldCard(1-tp, LOCATION_MZONE, 4) return Duel.GetFieldCard(1-tp, LOCATION_MZONE, 4)
elseif seq == 6 then elseif seq == 6 then
return Duel.GetFieldCard(1-tp, LOCATION_MZONE, 2) return Duel.GetFieldCard(1-tp, LOCATION_MZONE, 2)
end end
else else
if seq > 0 then if seq > 0 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, seq-1) return Duel.GetFieldCard(tp, LOCATION_MZONE, seq-1)
end end
end end
end end
function Nef.getDir9CardByPos(tp, loc, seq) function Nef.getDir9CardByPos(tp, loc, seq)
if loc == LOCATION_MZONE then if loc == LOCATION_MZONE then
if seq == 0 then if seq == 0 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, 5) return Duel.GetFieldCard(tp, LOCATION_MZONE, 5)
elseif seq == 2 then elseif seq == 2 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, 6) return Duel.GetFieldCard(tp, LOCATION_MZONE, 6)
elseif seq == 5 then elseif seq == 5 then
return Duel.GetFieldCard(1-tp, LOCATION_MZONE, 2) return Duel.GetFieldCard(1-tp, LOCATION_MZONE, 2)
elseif seq == 6 then elseif seq == 6 then
return Duel.GetFieldCard(1-tp, LOCATION_MZONE, 4) return Duel.GetFieldCard(1-tp, LOCATION_MZONE, 4)
end end
else else
if seq < 4 then if seq < 4 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, seq+1) return Duel.GetFieldCard(tp, LOCATION_MZONE, seq+1)
end end
end end
end end
function Nef.getDir4CardByPos(tp, loc, seq) function Nef.getDir4CardByPos(tp, loc, seq)
if loc == LOCATION_MZONE then if loc == LOCATION_MZONE then
if 1 < seq and seq < 5 then if 1 < seq and seq < 5 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, seq-1) return Duel.GetFieldCard(tp, LOCATION_MZONE, seq-1)
end end
else else
if 1 < seq and seq < 5 then if 1 < seq and seq < 5 then
return Duel.GetFieldCard(tp, LOCATION_SZONE, seq-1) return Duel.GetFieldCard(tp, LOCATION_SZONE, seq-1)
end end
end end
end end
function Nef.getDir6CardByPos(tp, loc, seq) function Nef.getDir6CardByPos(tp, loc, seq)
if loc == LOCATION_MZONE then if loc == LOCATION_MZONE then
if 0 < seq and seq < 4 then if 0 < seq and seq < 4 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, seq+1) return Duel.GetFieldCard(tp, LOCATION_MZONE, seq+1)
end end
else else
if 0 < seq and seq < 4 then if 0 < seq and seq < 4 then
return Duel.GetFieldCard(tp, LOCATION_SZONE, seq+1) return Duel.GetFieldCard(tp, LOCATION_SZONE, seq+1)
end end
end end
end end
function Nef.getDir2CardByPos(tp, loc, seq) function Nef.getDir2CardByPos(tp, loc, seq)
if loc == LOCATION_MZONE then if loc == LOCATION_MZONE then
if seq == 5 then if seq == 5 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, 1) return Duel.GetFieldCard(tp, LOCATION_MZONE, 1)
elseif seq == 6 then elseif seq == 6 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, 3) return Duel.GetFieldCard(tp, LOCATION_MZONE, 3)
else else
return Duel.GetFieldCard(tp, LOCATION_SZONE, seq) return Duel.GetFieldCard(tp, LOCATION_SZONE, seq)
end end
end end
end end
function Nef.getDir1CardByPos(tp, loc, seq) function Nef.getDir1CardByPos(tp, loc, seq)
if loc == LOCATION_MZONE then if loc == LOCATION_MZONE then
if seq == 5 then if seq == 5 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, 0) return Duel.GetFieldCard(tp, LOCATION_MZONE, 0)
elseif seq == 6 then elseif seq == 6 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, 2) return Duel.GetFieldCard(tp, LOCATION_MZONE, 2)
elseif seq > 0 then elseif seq > 0 then
return Duel.GetFieldCard(tp, LOCATION_SZONE, seq-1) return Duel.GetFieldCard(tp, LOCATION_SZONE, seq-1)
end end
end end
end end
function Nef.getDir3CardByPos(tp, loc, seq) function Nef.getDir3CardByPos(tp, loc, seq)
if loc == LOCATION_MZONE then if loc == LOCATION_MZONE then
if seq == 5 then if seq == 5 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, 2) return Duel.GetFieldCard(tp, LOCATION_MZONE, 2)
elseif seq == 6 then elseif seq == 6 then
return Duel.GetFieldCard(tp, LOCATION_MZONE, 4) return Duel.GetFieldCard(tp, LOCATION_MZONE, 4)
elseif seq < 4 then elseif seq < 4 then
return Duel.GetFieldCard(tp, LOCATION_SZONE, seq+1) return Duel.GetFieldCard(tp, LOCATION_SZONE, seq+1)
end end
end end
end end
function Nef.RegisterBigFiendEffect(c,e) function Nef.RegisterBigFiendEffect(c,e)
c:RegisterEffect(e) c:RegisterEffect(e)
local ex=e:Clone() local ex=e:Clone()
ex:SetRange(LOCATION_HAND) ex:SetRange(LOCATION_HAND)
local con=e:GetCondition() local con=e:GetCondition()
ex:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) ex:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return (not con or con(e,tp,eg,ep,ev,re,r,rp)) and Duel.IsPlayerAffectedByEffect(tp,22211) and e:GetHandler():IsSetCard(0x222) return (not con or con(e,tp,eg,ep,ev,re,r,rp)) and Duel.IsPlayerAffectedByEffect(tp,22211) and e:GetHandler():IsSetCard(0x222)
end) end)
if ex:IsHasType(EFFECT_TYPE_IGNITION) then if ex:IsHasType(EFFECT_TYPE_IGNITION) then
ex:SetType((ex:GetType() & ~EFFECT_TYPE_IGNITION) | EFFECT_TYPE_QUICK_O) ex:SetType((ex:GetType() & ~EFFECT_TYPE_IGNITION) | EFFECT_TYPE_QUICK_O)
ex:SetCode(EVENT_FREE_CHAIN) ex:SetCode(EVENT_FREE_CHAIN)
ex:SetHintTiming(0,0x1c0) ex:SetHintTiming(0,0x1c0)
end end
c:RegisterEffect(ex) c:RegisterEffect(ex)
end end
function Auxiliary.NonTuner(f,...) function Auxiliary.NonTuner(f,...)
local ext_params={...} local ext_params={...}
return function(target,syncard) return function(target,syncard)
return (not syncard or target:IsNotTuner(syncard)) and (not f or f(target,table.unpack(ext_params))) return (not syncard or target:IsNotTuner(syncard)) and (not f or f(target,table.unpack(ext_params)))
end end
end end
if not Nef.SeedField then if not Nef.SeedField then
local class = {} local class = {}
class.seeds = {} class.seeds = {}
class.hint = true class.hint = true
function class.readZone(zone) function class.readZone(zone)
local zone0 = zone & 0xff local zone0 = zone & 0xff
local zone1 = zone >> 16 local zone1 = zone >> 16
local flag0 = math.log(zone0, 2) local flag0 = math.log(zone0, 2)
local flag1 = math.log(zone1, 2) local flag1 = math.log(zone1, 2)
return math.log(zone, 2), flag0, flag1, zone0, zone1 return math.log(zone, 2), flag0, flag1, zone0, zone1
end end
-- 换算zone为seq,>=16在对方场上 -- 换算zone为seq,>=16在对方场上
function class.getSeq(zone) function class.getSeq(zone)
local a, b = class.readZone(zone) local a, b = class.readZone(zone)
if b > 4 then if b > 4 then
return b return b
else else
return a return a
end end
end end
-- 换算zone为seq,>=16在玩家1场上,因为extra区算玩家0的,所以转换一下22和21为5和6 -- 换算zone为seq,>=16在玩家1场上,因为extra区算玩家0的,所以转换一下22和21为5和6
function class.getSeq0(zone) function class.getSeq0(zone)
local seq0 = class.getSeq(zone) local seq0 = class.getSeq(zone)
if seq0 > 20 then seq0 = 27 - seq0 end if seq0 > 20 then seq0 = 27 - seq0 end
return seq0 return seq0
end end
-- 换算为玩家0的相对zone, extra区域算玩家0的 -- 换算为玩家0的相对zone, extra区域算玩家0的
function class.fmtZone(tp, zone) function class.fmtZone(tp, zone)
if tp == 0 then if tp == 0 then
return zone return zone
else else
local seq, seqTP, seqNTP, zoneTP, zoneNTP = class.readZone(zone) local seq, seqTP, seqNTP, zoneTP, zoneNTP = class.readZone(zone)
if seqTP == 5 or seqTP == 6 then if seqTP == 5 or seqTP == 6 then
return zoneTP << 16 | zoneNTP return zoneTP << 16 | zoneNTP
else else
if seq >= 16 then if seq >= 16 then
return 1 << (seq - 16) return 1 << (seq - 16)
else else
return 1 << (seq + 16) return 1 << (seq + 16)
end end
end end
end end
end end
--[[ --[[
tp 种子持有者 tp 种子持有者
zone 目标区域 zone 目标区域
]] ]]
function class.addSeed(e, tp, zoneTP) function class.addSeed(e, tp, zoneTP)
local zone = class.fmtZone(tp, zoneTP) local zone = class.fmtZone(tp, zoneTP)
local seq = class.getSeq0(zone) local seq = class.getSeq0(zone)
local p = 0 local p = 0
local pseq = seq local pseq = seq
if pseq >= 16 then if pseq >= 16 then
p = 1 p = 1
pseq = pseq - 16 pseq = pseq - 16
end end
if class.isHasSeed(0, seq) or (not Duel.CheckLocation(p, LOCATION_MZONE, seq)) then return false end if class.isHasSeed(0, seq) or (not Duel.CheckLocation(p, LOCATION_MZONE, seq)) then return false end
local c = e:GetHandler() local c = e:GetHandler()
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(class.tg) e1:SetTarget(class.tg)
e1:SetOperation(class.op) e1:SetOperation(class.op)
e1:SetLabel(seq) e1:SetLabel(seq)
Duel.RegisterEffect(e1, tp) Duel.RegisterEffect(e1, tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
Duel.RegisterEffect(e2, tp) Duel.RegisterEffect(e2, tp)
class.seeds[seq] = {tp, e1, e2} class.seeds[seq] = {tp, e1, e2}
class.showSeedZone() class.showSeedZone()
return true return true
end end
--[[ --[[
tp 种子持有者 tp 种子持有者
p seq的玩家 p seq的玩家
seq 相对玩家p目标区域序号 seq 相对玩家p目标区域序号
]] ]]
function class.addSeedWithSeq(e, tp, p, seq) function class.addSeedWithSeq(e, tp, p, seq)
local fix = p == tp and 0 or 16 local fix = p == tp and 0 or 16
return class.addSeed(e, tp, 1 << (seq + fix)) return class.addSeed(e, tp, 1 << (seq + fix))
end end
function class.showSeedZone() function class.showSeedZone()
if class.hint == false then return end if class.hint == false then return end
local zone00, zone01 = 0, 0 local zone00, zone01 = 0, 0
local zone10, zone11 = 0, 0 local zone10, zone11 = 0, 0
for i = 0, 4 do for i = 0, 4 do
if class.seeds[i] then if class.seeds[i] then
local p = class.seeds[i][1] local p = class.seeds[i][1]
if p == 0 then if p == 0 then
zone00 = zone00 | 1<<i zone00 = zone00 | 1<<i
zone10 = zone10 | 1<<(i+16) zone10 = zone10 | 1<<(i+16)
else else
zone01 = zone01 | 1<<i zone01 = zone01 | 1<<i
zone11 = zone11 | 1<<(i+16) zone11 = zone11 | 1<<(i+16)
end end
end end
if class.seeds[i+16] then if class.seeds[i+16] then
local p = class.seeds[i+16][1] local p = class.seeds[i+16][1]
if p == 0 then if p == 0 then
zone00 = zone00 | 1<<(i+16) zone00 = zone00 | 1<<(i+16)
zone10 = zone10 | 1<<i zone10 = zone10 | 1<<i
else else
zone01 = zone01 | 1<<(i+16) zone01 = zone01 | 1<<(i+16)
zone11 = zone11 | 1<<i zone11 = zone11 | 1<<i
end end
end end
end end
for i = 5, 6 do for i = 5, 6 do
if class.seeds[i] then if class.seeds[i] then
local p = class.seeds[i][1] local p = class.seeds[i][1]
if p == 0 then if p == 0 then
zone00 = zone00 | 1<<i | 1<<(i+16) zone00 = zone00 | 1<<i | 1<<(i+16)
zone10 = zone10 | 1<<i | 1<<(i+16) zone10 = zone10 | 1<<i | 1<<(i+16)
else else
zone01 = zone01 | 1<<i | 1<<(i+16) zone01 = zone01 | 1<<i | 1<<(i+16)
zone11 = zone11 | 1<<i | 1<<(i+16) zone11 = zone11 | 1<<i | 1<<(i+16)
end end
end end
end end
if zone10 > 0 then if zone10 > 0 then
Duel.Hint(HINT_CODE, 1, 999399) Duel.Hint(HINT_CODE, 1, 999399)
Duel.Hint(HINT_ZONE, 1, zone10) Duel.Hint(HINT_ZONE, 1, zone10)
else else
Duel.Hint(HINT_CODE, 1, 999398) Duel.Hint(HINT_CODE, 1, 999398)
end end
if zone11 > 0 then if zone11 > 0 then
Duel.Hint(HINT_CODE, 1, 999397) Duel.Hint(HINT_CODE, 1, 999397)
Duel.Hint(HINT_ZONE, 1, zone11) Duel.Hint(HINT_ZONE, 1, zone11)
else else
Duel.Hint(HINT_CODE, 1, 999396) Duel.Hint(HINT_CODE, 1, 999396)
end end
if zone01 > 0 then if zone01 > 0 then
Duel.Hint(HINT_CODE, 0, 999399) Duel.Hint(HINT_CODE, 0, 999399)
Duel.Hint(HINT_ZONE, 0, zone01) Duel.Hint(HINT_ZONE, 0, zone01)
else else
Duel.Hint(HINT_CODE, 0, 999398) Duel.Hint(HINT_CODE, 0, 999398)
end end
if zone00 > 0 then if zone00 > 0 then
Duel.Hint(HINT_CODE, 0, 999397) Duel.Hint(HINT_CODE, 0, 999397)
Duel.Hint(HINT_ZONE, 0, zone00) Duel.Hint(HINT_ZONE, 0, zone00)
else else
Duel.Hint(HINT_CODE, 0, 999396) Duel.Hint(HINT_CODE, 0, 999396)
end end
end end
function class.addStep() function class.addStep()
class.hint = false class.hint = false
end end
function class.addComplete() function class.addComplete()
class.hint = true class.hint = true
class.showSeedZone() class.showSeedZone()
end end
function class.getSeedOwner(tp, seq) function class.getSeedOwner(tp, seq)
local zone0 = class.fmtZone(tp, 1 << seq) local zone0 = class.fmtZone(tp, 1 << seq)
local seq0 = class.getSeq0(zone0) local seq0 = class.getSeq0(zone0)
return class.seeds[seq0] and class.seeds[seq0][1] return class.seeds[seq0] and class.seeds[seq0][1]
end end
-- 相对于tp的seq位置是否有种子 -- 相对于tp的seq位置是否有种子
function class.isHasSeed(tp, seq) function class.isHasSeed(tp, seq)
return class.getSeedOwner(tp, seq) ~= nil return class.getSeedOwner(tp, seq) ~= nil
end end
-- 相对于tp的seq位置是否有种子, 或该位置上的怪兽是否有种子指示物 -- 相对于tp的seq位置是否有种子, 或该位置上的怪兽是否有种子指示物
function class.isHasSeedEx(tp, seq) function class.isHasSeedEx(tp, seq)
local zc = Duel.GetFieldCard(tp, LOCATION_MZONE, seq) local zc = Duel.GetFieldCard(tp, LOCATION_MZONE, seq)
return class.isHasSeed(tp, seq) or (zc and zc:GetCounter(0x10a2) > 0) return class.isHasSeed(tp, seq) or (zc and zc:GetCounter(0x10a2) > 0)
end end
-- 删除相对于tp的seq位置的种子 -- 删除相对于tp的seq位置的种子
function class.delSeed(tp, seq) function class.delSeed(tp, seq)
local zone0 = class.fmtZone(tp, 1 << seq) local zone0 = class.fmtZone(tp, 1 << seq)
local seq0 = class.getSeq0(zone0) local seq0 = class.getSeq0(zone0)
local t = class.seeds[seq0] local t = class.seeds[seq0]
t[2]:Reset() t[2]:Reset()
t[3]:Reset() t[3]:Reset()
class.seeds[seq0] = nil class.seeds[seq0] = nil
class.showSeedZone() class.showSeedZone()
end end
function class.isHasSeedOnField() function class.isHasSeedOnField()
for _, v in pairs(class.seeds) do for _, v in pairs(class.seeds) do
return true return true
end end
return false return false
end end
function class.cfilter(c, seq) function class.cfilter(c, seq)
if c:IsLocation(LOCATION_MZONE) then if c:IsLocation(LOCATION_MZONE) then
local p = c:GetControler() local p = c:GetControler()
local cseq = c:GetSequence() local cseq = c:GetSequence()
if p == 1 then if p == 1 then
p = 0 p = 0
if cseq < 5 then if cseq < 5 then
cseq = cseq + 16 cseq = cseq + 16
else else
cseq = 11 - cseq cseq = 11 - cseq
end end
end end
return cseq == seq and class.isHasSeed(p, cseq) and c:IsFaceup() return cseq == seq and class.isHasSeed(p, cseq) and c:IsFaceup()
end end
end end
function class.tg(e,tp,eg,ep,ev,re,r,rp,chk) function class.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then if chk == 0 then
local seq = e:GetLabel() local seq = e:GetLabel()
return eg:IsExists(class.cfilter, 1, nil, seq) return eg:IsExists(class.cfilter, 1, nil, seq)
end end
end end
function class.op(e,tp,eg,ep,ev,re,r,rp) function class.op(e,tp,eg,ep,ev,re,r,rp)
local seq = e:GetLabel() local seq = e:GetLabel()
local g = eg:Filter(class.cfilter, nil, seq) local g = eg:Filter(class.cfilter, nil, seq)
local tg = g:Filter(Card.IsLocation, nil, LOCATION_MZONE) local tg = g:Filter(Card.IsLocation, nil, LOCATION_MZONE)
if tg:GetCount() > 0 then if tg:GetCount() > 0 then
local c = tg:GetFirst() local c = tg:GetFirst()
local p = class.getSeedOwner(0, seq) local p = class.getSeedOwner(0, seq)
if (c:GetControler() == p) then if (c:GetControler() == p) then
Duel.Hint(HINT_CARD, 0, 999312) Duel.Hint(HINT_CARD, 0, 999312)
-- up atk -- up atk
local e1=Effect.CreateEffect(e:GetOwner()) local e1=Effect.CreateEffect(e:GetOwner())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(400) e1:SetValue(400)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- can not be target -- can not be target
local e2=Effect.CreateEffect(e:GetOwner()) local e2=Effect.CreateEffect(e:GetOwner())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(aux.tgoval) e2:SetValue(aux.tgoval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else else
Duel.Hint(HINT_CARD, 0, 999312) Duel.Hint(HINT_CARD, 0, 999312)
-- down atk -- down atk
local e1=Effect.CreateEffect(e:GetOwner()) local e1=Effect.CreateEffect(e:GetOwner())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(-400) e1:SetValue(-400)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- change race -- change race
if not c:IsRace(RACE_PLANT) then if not c:IsRace(RACE_PLANT) then
local e1 = Effect.CreateEffect(e:GetOwner()) local e1 = Effect.CreateEffect(e:GetOwner())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE) e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(RACE_PLANT) e1:SetValue(RACE_PLANT)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
-- change level -- change level
if not c:IsType(TYPE_XYZ) and not c:IsType(TYPE_LINK) then if not c:IsType(TYPE_XYZ) and not c:IsType(TYPE_LINK) then
local e2 = Effect.CreateEffect(e:GetOwner()) local e2 = Effect.CreateEffect(e:GetOwner())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_UPDATE_LEVEL) e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(-1) e2:SetValue(-1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
end end
-- add counter -- add counter
c:AddCounter(0x10a2, 1) c:AddCounter(0x10a2, 1)
class.delSeed(0, seq) class.delSeed(0, seq)
end end
end end
Nef.SeedField = class Nef.SeedField = class
end end
if not Nef.PLCounter then if not Nef.PLCounter then
local class = {} local class = {}
class._e = { class._e = {
[0] = {}, [0] = {},
[1] = {}, [1] = {},
} }
class._n = { class._n = {
[0] = {}, [0] = {},
[1] = {}, [1] = {},
} }
function class.Add(tp, code, num) function class.Add(tp, code, num)
local eg = class._e[tp][code] local eg = class._e[tp][code]
if eg then if eg then
local e = eg:GetLabelObject() local e = eg:GetLabelObject()
e:Reset() e:Reset()
eg:Reset() eg:Reset()
end end
local e1 = Effect.GlobalEffect() local e1 = Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT)
local eg1 = Effect.GlobalEffect() local eg1 = Effect.GlobalEffect()
eg1:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_GRANT) eg1:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_GRANT)
eg1:SetTargetRange(0xff, 0) eg1:SetTargetRange(0xff, 0)
eg1:SetTarget(aux.TRUE) eg1:SetTarget(aux.TRUE)
local count = (class._n[tp][code] or 0) + num local count = (class._n[tp][code] or 0) + num
class._e[tp][code] = eg1 class._e[tp][code] = eg1
class._n[tp][code] = count class._n[tp][code] = count
e1:SetDescription(aux.Stringid(code, count)) e1:SetDescription(aux.Stringid(code, count))
eg1:SetLabelObject(e1) eg1:SetLabelObject(e1)
Duel.RegisterEffect(eg1, tp) Duel.RegisterEffect(eg1, tp)
end end
function class.Get(tp, code) function class.Get(tp, code)
return class._n[tp][code] or 0 return class._n[tp][code] or 0
end end
Nef.PLCounter = class Nef.PLCounter = class
end end
\ No newline at end of file
-- --
require "expansions/script/nef/nef" require "expansions/script/nef/nef"
Uds={} Uds={}
local Udsflag = true local Udsflag = true
Uds.dataList = {} Uds.dataList = {}
Uds.cardList = {} Uds.cardList = {}
--rewrite --rewrite
function Auxiliary.PreloadUds() function Auxiliary.PreloadUds()
Uds.regCardData() Uds.regCardData()
Uds.regSelectCard() Uds.regSelectCard()
end end
function Uds.regCardData() function Uds.regCardData()
-- Uds.dataList = { -- Uds.dataList = {
-- [1] = {desc=aux.Stringid(37001,1), code=37001, cost=6}, -- [1] = {desc=aux.Stringid(37001,1), code=37001, cost=6},
-- [2] = {desc=aux.Stringid(37001,2), code=37002, cost=6}, -- [2] = {desc=aux.Stringid(37001,2), code=37002, cost=6},
-- [3] = {desc=aux.Stringid(37001,3), code=37003, cost=3}, -- [3] = {desc=aux.Stringid(37001,3), code=37003, cost=3},
-- [4] = {desc=aux.Stringid(37001,4), code=37004, cost=3}, -- [4] = {desc=aux.Stringid(37001,4), code=37004, cost=3},
-- [5] = {desc=aux.Stringid(37001,5), code=37005, cost=2}, -- [5] = {desc=aux.Stringid(37001,5), code=37005, cost=2},
-- [6] = {desc=aux.Stringid(37001,6), code=37006, cost=5}, -- [6] = {desc=aux.Stringid(37001,6), code=37006, cost=5},
-- [7] = {desc=aux.Stringid(37001,7), code=37007, cost=5}, -- [7] = {desc=aux.Stringid(37001,7), code=37007, cost=5},
-- [8] = {desc=aux.Stringid(37001,8), code=37008, cost=4}, -- [8] = {desc=aux.Stringid(37001,8), code=37008, cost=4},
-- [9] = {desc=aux.Stringid(37001,9), code=37009, cost=9}, -- [9] = {desc=aux.Stringid(37001,9), code=37009, cost=9},
-- [10] = {desc=aux.Stringid(37001,10), code=37010, cost=4}, -- [10] = {desc=aux.Stringid(37001,10), code=37010, cost=4},
-- } -- }
Uds.dataList = { Uds.dataList = {
[37001] = 6, [37001] = 6,
[37002] = 6, [37002] = 6,
[37003] = 3, [37003] = 3,
[37004] = 3, [37004] = 3,
[37005] = 2, [37005] = 2,
[37006] = 5, [37006] = 5,
[37007] = 5, [37007] = 5,
[37008] = 4, [37008] = 4,
[37009] = 9, [37009] = 9,
[37010] = 4, [37010] = 4,
[37011] = 3, [37011] = 3,
[37012] = 2, [37012] = 2,
} }
end end
function Uds.regSelectCard() function Uds.regSelectCard()
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_ADJUST) e1:SetCode(EVENT_ADJUST)
-- e1:SetCode(EVENT_PHASE+PHASE_DRAW) -- e1:SetCode(EVENT_PHASE+PHASE_DRAW)
e1:SetOperation(Uds.rscop) e1:SetOperation(Uds.rscop)
Duel.RegisterEffect(e1,0) Duel.RegisterEffect(e1,0)
end end
function Uds.rscop(e,tp,eg,ep,ev,re,r,rp) function Uds.rscop(e,tp,eg,ep,ev,re,r,rp)
-- --
if not Duel.SelectYesNo(tp,aux.Stringid(37000,2)) or not Duel.SelectYesNo(1-tp,aux.Stringid(37000,2)) then e:Reset() if not Duel.SelectYesNo(tp,aux.Stringid(37000,2)) or not Duel.SelectYesNo(1-tp,aux.Stringid(37000,2)) then e:Reset()
return end return end
for k,v in pairs(Uds.dataList) do for k,v in pairs(Uds.dataList) do
local token0=Duel.CreateToken(0, k) local token0=Duel.CreateToken(0, k)
local token1=Duel.CreateToken(1, k) local token1=Duel.CreateToken(1, k)
Duel.Remove(token0,POS_FACEDOWN,REASON_RULE) Duel.Remove(token0,POS_FACEDOWN,REASON_RULE)
Duel.Remove(token1,POS_FACEDOWN,REASON_RULE) Duel.Remove(token1,POS_FACEDOWN,REASON_RULE)
end end
local function checkCost(c, availableCost, trick) local function checkCost(c, availableCost, trick)
local code = c:GetCode() local code = c:GetCode()
if code == 37000 then return trick < 2 end if code == 37000 then return trick < 2 end
return Uds.dataList[code] and Uds.dataList[code] <= availableCost return Uds.dataList[code] and Uds.dataList[code] <= availableCost
end end
-- 初始选卡 -- 初始选卡
for player=0,1 do for player=0,1 do
local availableCost=10 local availableCost=10
local trick = 0 local trick = 0
while availableCost>0 do while availableCost>0 do
if Duel.GetMatchingGroupCount(checkCost, player, LOCATION_REMOVED, 0, nil, availableCost, trick)>0 then if Duel.GetMatchingGroupCount(checkCost, player, LOCATION_REMOVED, 0, nil, availableCost, trick)>0 then
local g=Duel.SelectMatchingCard(player, checkCost, player, LOCATION_REMOVED, 0, 1, 1, nil, availableCost, trick) local g=Duel.SelectMatchingCard(player, checkCost, player, LOCATION_REMOVED, 0, 1, 1, nil, availableCost, trick)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:GetCode()~=37000 then if tc:GetCode()~=37000 then
Uds.initCard(tc:GetCode(),player) Uds.initCard(tc:GetCode(),player)
availableCost = availableCost - Uds.dataList[tc:GetCode()] availableCost = availableCost - Uds.dataList[tc:GetCode()]
else else
trick = trick + 1 trick = trick + 1
end end
else else
availableCost = 0 availableCost = 0
end end
end end
-- -- 初始化table -- -- 初始化table
-- local availableCost=10 -- local availableCost=10
-- local t={} -- local t={}
-- for k,v in pairs(Uds.dataList) do -- for k,v in pairs(Uds.dataList) do
-- t[k]=v -- t[k]=v
-- end -- end
-- while availableCost>0 and #t>0 do -- while availableCost>0 and #t>0 do
-- Duel.Hint(HINT_MESSAGE,player,aux.Stringid(37000,0)) -- Duel.Hint(HINT_MESSAGE,player,aux.Stringid(37000,0))
-- local sel=Duel.SelectOption(player,Nef.unpackOneMember(t, "desc"))+1 -- local sel=Duel.SelectOption(player,Nef.unpackOneMember(t, "desc"))+1
-- local code=t[sel].code -- local code=t[sel].code
-- Uds.initCard(code,player) -- Uds.initCard(code,player)
-- -- 维护table -- -- 维护table
-- availableCost=availableCost-t[sel].cost -- availableCost=availableCost-t[sel].cost
-- for k=#t,1,-1 do -- for k=#t,1,-1 do
-- v=t[k] -- v=t[k]
-- if v.cost > availableCost then -- if v.cost > availableCost then
-- table.remove(t, k) -- table.remove(t, k)
-- end -- end
-- end -- end
-- end -- end
-- local token=Duel.CreateToken(player,37000) -- local token=Duel.CreateToken(player,37000)
-- Duel.Remove(token,POS_FACEUP,REASON_RULE) -- Duel.Remove(token,POS_FACEUP,REASON_RULE)
-- Duel.RaiseSingleEvent(e:GetHandler(),EVENT_REMOVE,e,REASON_RULE,player,player,0) -- Duel.RaiseSingleEvent(e:GetHandler(),EVENT_REMOVE,e,REASON_RULE,player,player,0)
-- for i=1,2 do -- for i=1,2 do
-- if Duel.SelectYesNo(player,aux.Stringid(37000,1)) then -- if Duel.SelectYesNo(player,aux.Stringid(37000,1)) then
-- local token=Duel.CreateToken(player,37000) -- local token=Duel.CreateToken(player,37000)
-- Duel.Remove(token,POS_FACEDOWN,REASON_RULE) -- Duel.Remove(token,POS_FACEDOWN,REASON_RULE)
-- end -- end
-- end -- end
end end
--销毁本效果 --销毁本效果
e:Reset() e:Reset()
end end
function Uds.initCard(code, player) function Uds.initCard(code, player)
if Uds.cardList[code] == nil then if Uds.cardList[code] == nil then
-- 初始化数据结构 -- 初始化数据结构
Uds.cardList[code] = {} Uds.cardList[code] = {}
Uds.cardList[code][0] = 0 Uds.cardList[code][0] = 0
Uds.cardList[code][1] = 0 Uds.cardList[code][1] = 0
end end
-- 初始化符卡 -- 初始化符卡
-- local token=Duel.CreateToken(player,code) -- local token=Duel.CreateToken(player,code)
-- Duel.Remove(token,POS_FACEDOWN,REASON_RULE) -- Duel.Remove(token,POS_FACEDOWN,REASON_RULE)
-- 存储使用次数 -- 存储使用次数
Uds.cardList[code][player] = Uds.cardList[code][player] + 1 Uds.cardList[code][player] = Uds.cardList[code][player] + 1
end end
function Uds.regUdsEffect(e,code) function Uds.regUdsEffect(e,code)
local e1=e:Clone() local e1=e:Clone()
e1:SetLabel(code) e1:SetLabel(code)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetOperation(Uds.setop) e1:SetOperation(Uds.setop)
Duel.RegisterEffect(e1,0) Duel.RegisterEffect(e1,0)
local e2=e1:Clone() local e2=e1:Clone()
Duel.RegisterEffect(e2,1) Duel.RegisterEffect(e2,1)
end end
function Uds.setop(e,tp,eg,ep,ev,re,r,rp) function Uds.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)==0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)==0 then return end
if Uds.cardList[e:GetLabel()] == nil then return end -- 排除没有被初始化的符卡 if Uds.cardList[e:GetLabel()] == nil then return end -- 排除没有被初始化的符卡
if Uds.cardList[e:GetLabel()][e:GetOwnerPlayer()] < 1 then return end -- 该玩家发动次数不足 if Uds.cardList[e:GetLabel()][e:GetOwnerPlayer()] < 1 then return end -- 该玩家发动次数不足
if not Duel.SelectYesNo(tp,aux.Stringid(e:GetLabel(),0)) then return end if not Duel.SelectYesNo(tp,aux.Stringid(e:GetLabel(),0)) then return end
-- 维护发动次数 -- 维护发动次数
Uds.cardList[e:GetLabel()][e:GetOwnerPlayer()] = Uds.cardList[e:GetLabel()][e:GetOwnerPlayer()] - 1 Uds.cardList[e:GetLabel()][e:GetOwnerPlayer()] = Uds.cardList[e:GetLabel()][e:GetOwnerPlayer()] - 1
-- 创建符卡 -- 创建符卡
local token=Duel.CreateToken(e:GetOwnerPlayer(),e:GetLabel()) local token=Duel.CreateToken(e:GetOwnerPlayer(),e:GetLabel())
Duel.MoveToField(token, e:GetOwnerPlayer(), e:GetOwnerPlayer(), LOCATION_SZONE, POS_FACEDOWN, false) Duel.MoveToField(token, e:GetOwnerPlayer(), e:GetOwnerPlayer(), LOCATION_SZONE, POS_FACEDOWN, false)
end end
Duel.LoadScript("nef/nef.lua") Duel.LoadScript("nef/nef.lua")
Duel.LoadScript("nef/msc.lua") Duel.LoadScript("nef/msc.lua")
Duel.LoadScript("nef/fus.lua") Duel.LoadScript("nef/fus.lua")
Duel.LoadScript("nef/ets.lua") Duel.LoadScript("nef/ets.lua")
Duel.LoadScript("nef/elf.lua") Duel.LoadScript("nef/elf.lua")
Duel.LoadScript("nef/dss.lua") Duel.LoadScript("nef/dss.lua")
Duel.LoadScript("nef/afi.lua") Duel.LoadScript("nef/afi.lua")
-- require "expansions/script/nef/nef" -- require "expansions/script/nef/nef"
-- require "expansions/script/nef/msc" -- require "expansions/script/nef/msc"
-- require "expansions/script/nef/fus" -- require "expansions/script/nef/fus"
-- require "expansions/script/nef/ets" -- require "expansions/script/nef/ets"
-- require "expansions/script/nef/elf" -- require "expansions/script/nef/elf"
-- require "expansions/script/nef/dss" -- require "expansions/script/nef/dss"
-- require "expansions/script/nef/afi" -- require "expansions/script/nef/afi"
-- require "nef/nef" -- require "nef/nef"
-- require "nef/msc" -- require "nef/msc"
-- require "nef/fus" -- require "nef/fus"
-- require "nef/ets" -- require "nef/ets"
-- require "nef/elf" -- require "nef/elf"
-- require "nef/dss" -- require "nef/dss"
-- require "nef/afi" -- require "nef/afi"
\ No newline at end of file
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