Commit 59a68af3 authored by POLYMER's avatar POLYMER

fix

parent 23d16351
...@@ -97,16 +97,42 @@ if not Duel.LoadScript and loadfile then ...@@ -97,16 +97,42 @@ if not Duel.LoadScript and loadfile then
return require_list[str] return require_list[str]
end end
end end
if not dofile and Duel.LoadScript then
function dofile(str)
require_list=require_list or {}
local name=str
for word in string.gmatch(str,"%w+") do
name=word
end
if not require_list[str] then
require_list[str]=Duel.LoadScript(name)
end
return require_list[str]
end
function loadfile(str)
require_list=require_list or {}
local name=str
for word in string.gmatch(str,"%w+") do
name=word
end
return function()
if not require_list[str] then
require_list[str]=Duel.LoadScript(name)
end
return require_list[str]
end
end
end
function cm.nnfilter(c,ec) function cm.nnfilter(c,ec)
if c:GetOriginalType()==0x11 or c:GetOriginalType()==0x1011 then return false end if c:GetOriginalType()&0x11==0x11 and c:GetOriginalType()&TYPE_PENDULUM==0 then return false end
if not c.initial_effect then return true end if not c.initial_effect then return true end
return false return false
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
--if apricot_nightfall_adjust then return end --if apricot_nightfall_adjust then return end
apricot_nightfall_adjust=true apricot_nightfall_adjust=true
e:Reset()
local c=e:GetHandler() local c=e:GetHandler()
e:Reset()
local tp=c:GetControler() local tp=c:GetControler()
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil)
if c:IsLocation(LOCATION_DECK) and #g>=36 then if c:IsLocation(LOCATION_DECK) and #g>=36 then
...@@ -120,16 +146,22 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -120,16 +146,22 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if not cm.r then if not cm.r then
cm.r=Duel.GetFieldGroup(0,LOCATION_DECK+LOCATION_HAND,LOCATION_DECK+LOCATION_EXTRA):GetSum(Card.GetCode) cm.r=Duel.GetFieldGroup(0,LOCATION_DECK+LOCATION_HAND,LOCATION_DECK+LOCATION_EXTRA):GetSum(Card.GetCode)
end end
--[[local tab={}
for i=1,10000000 do
tab[cm.r]=true
cm.roll(1,#g)
if i%100000==0 then Debug.Message(cm.r) end
if tab[cm.r] then Debug.Message(i.." "..cm.r) end
end--]]
local ct=cm.roll(1,#g)-1 local ct=cm.roll(1,#g)-1
local tc=g:Filter(function(c) return c:GetSequence()==ct end,nil):GetFirst() local tc=g:Filter(function(c) return c:GetSequence()==ct end,nil):GetFirst()
if KOISHI_CHECK then if KOISHI_CHECK then
c:SetEntityCode(tc:GetOriginalCode()) c:SetEntityCode(tc:GetOriginalCode())
local ini=cm.initial_effect if tc:GetOriginalType()&0x11~=0x11 or tc:GetOriginalType()&TYPE_PENDULUM>0 then
cm.initial_effect=function() end c:ReplaceEffect(tc:GetOriginalCode(),0)
c:ReplaceEffect(m,0) else
c:SetStatus(STATUS_EFFECT_REPLACED,false) c:ReplaceEffect(80316585,0)
cm.initial_effect=ini end
if tc.initial_effect then tc.initial_effect(c) end
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Exile(tc,0) Duel.Exile(tc,0)
else else
...@@ -165,7 +197,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -165,7 +197,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
GetID=function() GetID=function()
return _G["c"..int],int,int<100000000 and 1 or 100 return _G["c"..int],int,int<100000000 and 1 or 100
end end
require("expansions/script/c"..int) pcall(require,"expansions/script/c"..int)
local ini=ac.initial_effect local ini=ac.initial_effect
if ini then stack[#stack+1]=ac end if ini then stack[#stack+1]=ac end
end end
......
...@@ -48,14 +48,10 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,14 +48,10 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if KOISHI_CHECK then if KOISHI_CHECK then
local code=g:GetFirst():GetOriginalCode() local code=g:GetFirst():GetOriginalCode()
c:SetEntityCode(code) c:SetEntityCode(code)
local ini=cm.initial_effect if g:GetFirst():GetOriginalType()&0x11~=0x11 or g:GetFirst():GetOriginalType()&TYPE_PENDULUM>0 then
cm.initial_effect=function() end c:ReplaceEffect(code,0)
c:ReplaceEffect(m,0) else
cm.initial_effect=ini c:ReplaceEffect(80316585,0)
if not g:GetFirst():IsType(TYPE_NORMAL) or g:GetFirst():IsType(TYPE_PENDULUM) then
local cn=getmetatable(g:GetFirst())
if cn then cn.initial_effect(c) end
--c:ReplaceEffect(code,0)
end end
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
......
...@@ -68,6 +68,7 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,6 +68,7 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,tc,tc:GetLevel()) local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,tc,tc:GetLevel())
if tc and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and (not tc:IsLocation(LOCATION_MZONE) or tc:IsFaceup()) and #g>0 then if tc and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and (not tc:IsLocation(LOCATION_MZONE) or tc:IsFaceup()) and #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local fc=g:Select(tp,1,1,nil):GetFirst() local fc=g:Select(tp,1,1,nil):GetFirst()
local code=tc:GetOriginalCode() local code=tc:GetOriginalCode()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -78,13 +79,10 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,13 +79,10 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
fc:RegisterEffect(e1) fc:RegisterEffect(e1)
if fc:IsImmuneToEffect(e) then return end if fc:IsImmuneToEffect(e) then return end
if tc:GetOriginalType()&TYPE_NORMAL==0 then if tc:GetOriginalType()&0x11~=0x11 or tc:GetOriginalType()&TYPE_PENDULUM>0 then
fc:ReplaceEffect(code,RESET_EVENT+RESETS_STANDARD,1) fc:ReplaceEffect(code,RESET_EVENT+RESETS_STANDARD,1)
else else
local ini=cm.initial_effect fc:ReplaceEffect(80316585,RESET_EVENT+RESETS_STANDARD,1)
cm.initial_effect=function() end
fc:ReplaceEffect(m,RESET_EVENT+RESETS_STANDARD,1)
cm.initial_effect=ini
end end
end end
end end
\ No newline at end of file
...@@ -25,7 +25,7 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,7 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(0x20000000+m) e1:SetCode(EFFECT_FLAG_EFFECT+m)
e1:SetLabelObject(re) e1:SetLabelObject(re)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
...@@ -56,6 +56,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,6 +56,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end--]] end--]]
local g=Duel.GetMatchingGroup(Card.IsOriginalCodeRule,tp,0xff,0xff,nil,ac) local g=Duel.GetMatchingGroup(Card.IsOriginalCodeRule,tp,0xff,0xff,nil,ac)
local og=Duel.GetOverlayGroup(0,1,1):Filter(Card.IsOriginalCodeRule,nil,ac)
g:Merge(og)
local reg=Card.RegisterEffect local reg=Card.RegisterEffect
local ctl=Effect.SetCountLimit local ctl=Effect.SetCountLimit
Effect.SetCountLimit=function(se,ct,code) Effect.SetCountLimit=function(se,ct,code)
...@@ -76,7 +78,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,7 +78,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
reg(sc,se,true) reg(sc,se,true)
if cm[se] then if cm[se] then
cm[se]=nil cm[se]=nil
local eset={sc:IsHasEffect(0x20000000+m)} local eset={sc:IsHasEffect(EFFECT_FLAG_EFFECT+m)}
if #eset>0 then if #eset>0 then
local ct=0 local ct=0
for _,ee in pairs(eset) do for _,ee in pairs(eset) do
...@@ -88,11 +90,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,11 +90,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
for tc in aux.Next(g) do for tc in aux.Next(g) do
if tc.initial_effect then if tc.initial_effect then
local ini=cm.initial_effect tc:ReplaceEffect(tc:GetOriginalCode(),0)
cm.initial_effect=function() end
tc:ReplaceEffect(m,0)
cm.initial_effect=ini
tc.initial_effect(tc)
end end
end end
Card.RegisterEffect=reg Card.RegisterEffect=reg
......
...@@ -44,10 +44,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,10 +44,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,58192742,0,0x11,300,200,1,RACE_INSECT,ATTRIBUTE_EARTH) then if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,58192742,0,0x11,300,200,1,RACE_INSECT,ATTRIBUTE_EARTH) then
if KOISHI_CHECK then if KOISHI_CHECK then
c:SetEntityCode(58192742,true) c:SetEntityCode(58192742,true)
local ini=cm.initial_effect c:ReplaceEffect(80316585,0)
cm.initial_effect=function() end
c:ReplaceEffect(m,0)
cm.initial_effect=ini
else else
Duel.Remove(c,POS_FACEDOWN,REASON_RULE) Duel.Remove(c,POS_FACEDOWN,REASON_RULE)
c=Duel.CreateToken(tp,58192742) c=Duel.CreateToken(tp,58192742)
......
...@@ -185,13 +185,10 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab) ...@@ -185,13 +185,10 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
local tc=g2:Select(tp,1,1,nil):GetFirst() local tc=g2:Select(tp,1,1,nil):GetFirst()
local code=tc:GetOriginalCode() local code=tc:GetOriginalCode()
if not fc:IsImmuneToEffect(e) then if not fc:IsImmuneToEffect(e) then
if tc:GetOriginalType()&TYPE_NORMAL==0 then if tc:GetOriginalType()&0x11~=0x11 or tc:GetOriginalType()&TYPE_PENDULUM>0 then
fc:ReplaceEffect(code,RESET_EVENT+RESETS_STANDARD,1) fc:ReplaceEffect(code,RESET_EVENT+RESETS_STANDARD,1)
else else
local ini=cm.initial_effect fc:ReplaceEffect(80316585,RESET_EVENT+RESETS_STANDARD,1)
cm.initial_effect=function() end
fc:ReplaceEffect(m,RESET_EVENT+RESETS_STANDARD,1)
cm.initial_effect=ini
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -43,6 +43,7 @@ function c28321714.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,6 +43,7 @@ function c28321714.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(p,ct) Duel.ConfirmDecktop(p,ct)
local g=Duel.GetDecktopGroup(p,ct) local g=Duel.GetDecktopGroup(p,ct)
if #g>0 then if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,c28321714.thfilter,0,#g,nil) local sg=g:FilterSelect(tp,c28321714.thfilter,0,#g,nil)
if #sg>0 then if #sg>0 then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
......
...@@ -2,108 +2,109 @@ ...@@ -2,108 +2,109 @@
local m=89390000 local m=89390000
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE+LOCATION_HAND) e2:SetRange(LOCATION_MZONE+LOCATION_HAND)
e2:SetCondition(cm.thcon) e2:SetCondition(cm.thcon)
e2:SetCost(cm.thcost) e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg) e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop) e2:SetOperation(cm.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_REMOVE) e1:SetCode(EVENT_REMOVE)
e1:SetTarget(cm.srettg) e1:SetTarget(cm.srettg)
e1:SetOperation(cm.sretop) e1:SetOperation(cm.sretop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not cm.global_check then if not cm.global_check then
cm.global_check=true cm.global_check=true
cm[0]={} cm[0]={}
cm[1]={} cm[1]={}
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING) ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(cm.checkop) ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone() local ge2=ge1:Clone()
ge2:SetCode(EVENT_CHAIN_NEGATED) ge2:SetCode(EVENT_CHAIN_NEGATED)
ge2:SetOperation(cm.regop2) ge2:SetOperation(cm.regop2)
Duel.RegisterEffect(ge2,0) Duel.RegisterEffect(ge2,0)
local ge4=Effect.CreateEffect(c) local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_PHASE_START+PHASE_DRAW) ge4:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge4:SetOperation(cm.clearop) ge4:SetOperation(cm.clearop)
Duel.RegisterEffect(ge4,0) Duel.RegisterEffect(ge4,0)
end end
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp return rp==1-tp
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsRace(RACE_PSYCHO) and not c:IsCode(m) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsRace(RACE_PSYCHO) and not c:IsCode(m) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetChainLimit(aux.FALSE) Duel.SetChainLimit(aux.FALSE)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if tg:GetCount()>0 then if tg:GetCount()>0 then
local tc=tg:GetFirst() local tc=tg:GetFirst()
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_REMOVED) then return end if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_REMOVED) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
end end
function cm.srettg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.srettg(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_TODECK,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetChainLimit(aux.FALSE) Duel.SetChainLimit(aux.FALSE)
end end
function cm.sretop(e,tp,eg,ep,ev,re,r,rp) function cm.sretop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.GetFlagEffect(tp,m)==0 then if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.GetFlagEffect(tp,m)==0 then
local copyt=cm[tp] local copyt=cm[tp]
local exg=Group.CreateGroup() local exg=Group.CreateGroup()
for k,v in pairs(copyt) do for k,v in pairs(copyt) do
if k and v then exg:AddCard(k) end if k and v then exg:AddCard(k) end
end end
local cd=3 local cd=3
if c89390009 then cd=c89390009.cd end if c89390009 then cd=c89390009.cd end
if exg:GetClassCount(Card.GetOriginalCode)>=cd and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if exg:GetClassCount(Card.GetOriginalCode)>=cd and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()==1 then if g:GetCount()==1 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end end
end end
end end
end end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp) function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if re:IsActiveType(TYPE_MONSTER) and rc:IsRace(RACE_PSYCHO) then if re:IsActiveType(TYPE_MONSTER) and rc:IsRace(RACE_PSYCHO) then
cm[rp][rc]=1 if cm[rp][rc] then cm[rp][rc]=cm[rp][rc]+1 else cm[rp][rc]=1 end
end end
end end
function cm.regop2(e,tp,eg,ep,ev,re,r,rp) function cm.regop2(e,tp,eg,ep,ev,re,r,rp)
cm[rp][re:GetHandler()]=nil local rc=re:GetHandler()
if cm[rp][rc] then cm[rp][rc]=cm[rp][rc]-1 else cm[rp][rc]=nil end
end end
function cm.clearop(e,tp,eg,ep,ev,re,r,rp) function cm.clearop(e,tp,eg,ep,ev,re,r,rp)
cm[0]={} cm[0]={}
cm[1]={} cm[1]={}
end end
...@@ -2,108 +2,109 @@ ...@@ -2,108 +2,109 @@
local m=89390001 local m=89390001
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE+LOCATION_HAND) e2:SetRange(LOCATION_MZONE+LOCATION_HAND)
e2:SetCondition(cm.thcon) e2:SetCondition(cm.thcon)
e2:SetCost(cm.thcost) e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg) e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop) e2:SetOperation(cm.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE) e1:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_REMOVE) e1:SetCode(EVENT_REMOVE)
e1:SetTarget(cm.srettg) e1:SetTarget(cm.srettg)
e1:SetOperation(cm.sretop) e1:SetOperation(cm.sretop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not cm.global_check then if not cm.global_check then
cm.global_check=true cm.global_check=true
cm[0]={} cm[0]={}
cm[1]={} cm[1]={}
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING) ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(cm.checkop) ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone() local ge2=ge1:Clone()
ge2:SetCode(EVENT_CHAIN_NEGATED) ge2:SetCode(EVENT_CHAIN_NEGATED)
ge2:SetOperation(cm.regop2) ge2:SetOperation(cm.regop2)
Duel.RegisterEffect(ge2,0) Duel.RegisterEffect(ge2,0)
local ge4=Effect.CreateEffect(c) local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_PHASE_START+PHASE_DRAW) ge4:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge4:SetOperation(cm.clearop) ge4:SetOperation(cm.clearop)
Duel.RegisterEffect(ge4,0) Duel.RegisterEffect(ge4,0)
end end
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp return rp==1-tp
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsRace(RACE_PSYCHO) and not c:IsCode(m) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsRace(RACE_PSYCHO) and not c:IsCode(m) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetChainLimit(aux.FALSE) Duel.SetChainLimit(aux.FALSE)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if tg:GetCount()>0 then if tg:GetCount()>0 then
local tc=tg:GetFirst() local tc=tg:GetFirst()
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_REMOVED) then return end if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_REMOVED) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
end end
function cm.srettg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.srettg(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_TODECK,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetChainLimit(aux.FALSE) Duel.SetChainLimit(aux.FALSE)
end end
function cm.sretop(e,tp,eg,ep,ev,re,r,rp) function cm.sretop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.GetFlagEffect(tp,m)==0 then if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.GetFlagEffect(tp,m)==0 then
local copyt=cm[tp] local copyt=cm[tp]
local exg=Group.CreateGroup() local exg=Group.CreateGroup()
for k,v in pairs(copyt) do for k,v in pairs(copyt) do
if k and v then exg:AddCard(k) end if k and v then exg:AddCard(k) end
end end
local cd=3 local cd=3
if c89390009 then cd=c89390009.cd end if c89390009 then cd=c89390009.cd end
if exg:GetClassCount(Card.GetOriginalCode)>=cd and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if exg:GetClassCount(Card.GetOriginalCode)>=cd and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end end
end end
end end
end end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp) function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if re:IsActiveType(TYPE_MONSTER) and rc:IsRace(RACE_PSYCHO) then if re:IsActiveType(TYPE_MONSTER) and rc:IsRace(RACE_PSYCHO) then
cm[rp][rc]=1 if cm[rp][rc] then cm[rp][rc]=cm[rp][rc]+1 else cm[rp][rc]=1 end
end end
end end
function cm.regop2(e,tp,eg,ep,ev,re,r,rp) function cm.regop2(e,tp,eg,ep,ev,re,r,rp)
cm[rp][re:GetHandler()]=nil local rc=re:GetHandler()
if cm[rp][rc] then cm[rp][rc]=cm[rp][rc]-1 else cm[rp][rc]=nil end
end end
function cm.clearop(e,tp,eg,ep,ev,re,r,rp) function cm.clearop(e,tp,eg,ep,ev,re,r,rp)
cm[0]={} cm[0]={}
cm[1]={} cm[1]={}
end end
This diff is collapsed.
...@@ -123,17 +123,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -123,17 +123,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.checkop(e,tp,eg,ep,ev,re,r,rp) function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if re:IsActiveType(TYPE_MONSTER) and not s[0][re:GetHandler()] then
re:GetHandler():RegisterFlagEffect(id+100,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
end
if Duel.GetCurrentChain()>=4 then if Duel.GetCurrentChain()>=4 then
for i=1,ev do for i=1,ev do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT) local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
if te:IsActiveType(TYPE_MONSTER) then if te:GetHandler():GetFlagEffect(id+100)>0 then
s[0][te:GetHandler()]=1 s[0][te:GetHandler()]=1
end end
end end
end end
end end
function s.regop2(e,tp,eg,ep,ev,re,r,rp) function s.regop2(e,tp,eg,ep,ev,re,r,rp)
s[0][re:GetHandler()]=nil if re:GetHandler():GetFlagEffect(id+100)>0 then
re:GetHandler():IsHasEffect(EFFECT_FLAG_EFFECT+id+100):Reset()
if re:GetHandler():GetFlagEffect(id+100)==0 then
s[0][re:GetHandler()]=nil
end
end
end end
function s.clearop(e,tp,eg,ep,ev,re,r,rp) function s.clearop(e,tp,eg,ep,ev,re,r,rp)
s[0]={} s[0]={}
......
...@@ -122,17 +122,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -122,17 +122,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.checkop(e,tp,eg,ep,ev,re,r,rp) function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if re:IsActiveType(TYPE_MONSTER) and not s[0][re:GetHandler()] then
re:GetHandler():RegisterFlagEffect(id+100,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
end
if Duel.GetCurrentChain()>=4 then if Duel.GetCurrentChain()>=4 then
for i=1,ev do for i=1,ev do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT) local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
if te:IsActiveType(TYPE_MONSTER) then if te:GetHandler():GetFlagEffect(id+100)>0 then
s[0][te:GetHandler()]=1 s[0][te:GetHandler()]=1
end end
end end
end end
end end
function s.regop2(e,tp,eg,ep,ev,re,r,rp) function s.regop2(e,tp,eg,ep,ev,re,r,rp)
s[0][re:GetHandler()]=nil if re:GetHandler():GetFlagEffect(id+100)>0 then
re:GetHandler():IsHasEffect(EFFECT_FLAG_EFFECT+id+100):Reset()
if re:GetHandler():GetFlagEffect(id+100)==0 then
s[0][re:GetHandler()]=nil
end
end
end end
function s.clearop(e,tp,eg,ep,ev,re,r,rp) function s.clearop(e,tp,eg,ep,ev,re,r,rp)
s[0]={} s[0]={}
......
...@@ -143,17 +143,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -143,17 +143,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.checkop(e,tp,eg,ep,ev,re,r,rp) function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if re:IsActiveType(TYPE_MONSTER) and not s[0][re:GetHandler()] then
re:GetHandler():RegisterFlagEffect(id+100,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
end
if Duel.GetCurrentChain()>=4 then if Duel.GetCurrentChain()>=4 then
for i=1,ev do for i=1,ev do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT) local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
if te:IsActiveType(TYPE_MONSTER) then if te:GetHandler():GetFlagEffect(id+100)>0 then
s[0][te:GetHandler()]=1 s[0][te:GetHandler()]=1
end end
end end
end end
end end
function s.regop2(e,tp,eg,ep,ev,re,r,rp) function s.regop2(e,tp,eg,ep,ev,re,r,rp)
s[0][re:GetHandler()]=nil if re:GetHandler():GetFlagEffect(id+100)>0 then
re:GetHandler():IsHasEffect(EFFECT_FLAG_EFFECT+id+100):Reset()
if re:GetHandler():GetFlagEffect(id+100)==0 then
s[0][re:GetHandler()]=nil
end
end
end end
function s.clearop(e,tp,eg,ep,ev,re,r,rp) function s.clearop(e,tp,eg,ep,ev,re,r,rp)
s[0]={} s[0]={}
......
...@@ -145,17 +145,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -145,17 +145,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.checkop(e,tp,eg,ep,ev,re,r,rp) function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if re:IsActiveType(TYPE_MONSTER) and not s[0][re:GetHandler()] then
re:GetHandler():RegisterFlagEffect(id+100,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
end
if Duel.GetCurrentChain()>=4 then if Duel.GetCurrentChain()>=4 then
for i=1,ev do for i=1,ev do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT) local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
if te:IsActiveType(TYPE_MONSTER) then if te:GetHandler():GetFlagEffect(id+100)>0 then
s[0][te:GetHandler()]=1 s[0][te:GetHandler()]=1
end end
end end
end end
end end
function s.regop2(e,tp,eg,ep,ev,re,r,rp) function s.regop2(e,tp,eg,ep,ev,re,r,rp)
s[0][re:GetHandler()]=nil if re:GetHandler():GetFlagEffect(id+100)>0 then
re:GetHandler():IsHasEffect(EFFECT_FLAG_EFFECT+id+100):Reset()
if re:GetHandler():GetFlagEffect(id+100)==0 then
s[0][re:GetHandler()]=nil
end
end
end end
function s.clearop(e,tp,eg,ep,ev,re,r,rp) function s.clearop(e,tp,eg,ep,ev,re,r,rp)
s[0]={} s[0]={}
......
...@@ -61,12 +61,12 @@ end ...@@ -61,12 +61,12 @@ end
function s.stop(e,tp,eg,ep,ev,re,r,rp) function s.stop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsControler(tp) and not tc:IsImmuneToEffect(e)) then return end if not (tc:IsRelateToEffect(e) and tc:IsControler(tp) and not tc:IsImmuneToEffect(e)) then return end
local zone=1<<tc:GetSequence() local zone=1<<4-tc:GetSequence()
local oc=Duel.GetMatchingGroup(s.seqfilter,tp,0,LOCATION_MZONE,nil,tc:GetSequence()):GetFirst() local oc=Duel.GetMatchingGroup(s.seqfilter,tp,0,LOCATION_MZONE,nil,tc:GetSequence()):GetFirst()
if oc then if oc then
Duel.Destroy(oc,REASON_RULE) Duel.Destroy(oc,REASON_RULE)
end end
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) and Duel.GetControl(tc,1-tp,0,0,zone) then if Duel.GetControl(tc,1-tp,0,0,zone) then
local oc=Duel.GetMatchingGroup(s.seqfilter,tp,0,LOCATION_SZONE,nil,tc:GetSequence()):GetFirst() local oc=Duel.GetMatchingGroup(s.seqfilter,tp,0,LOCATION_SZONE,nil,tc:GetSequence()):GetFirst()
if oc then if oc then
Duel.Destroy(oc,REASON_RULE) Duel.Destroy(oc,REASON_RULE)
...@@ -89,5 +89,5 @@ function s.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,5 +89,5 @@ function s.stop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.seqfilter(c,seq) function s.seqfilter(c,seq)
return c:GetSequence()==seq return 4-c:GetSequence()==seq
end end
\ No newline at end of file
...@@ -71,7 +71,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,7 +71,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return false return false
end end
end end
function s.thfilter(c,chk) function s.thfilter(c,e,chk)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -182,7 +182,15 @@ function Auxiliary.PreloadUds() ...@@ -182,7 +182,15 @@ function Auxiliary.PreloadUds()
return 0 return 0
end end
end end
if not Card.GetLinkMarker then
function Card.GetLinkMarker(c)
local res=0
for i=0,8 do
if i~=4 and c:IsLinkMarker(1<<i) then res=res|(1<<i)
end
return res
end
end
local _CRegisterEffect=Card.RegisterEffect local _CRegisterEffect=Card.RegisterEffect
function Card.RegisterEffect(c,e,...) function Card.RegisterEffect(c,e,...)
if aux.GetValueType(c)~="Card" then error("Card.RegisterEffect没有输入正确的Card参数。",2) return end if aux.GetValueType(c)~="Card" then error("Card.RegisterEffect没有输入正确的Card参数。",2) return end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment