Commit a6a72417 authored by Tachibana's avatar Tachibana

ndyd

parent 21a6e952
Pipeline #5193 failed with stages
in 15 minutes and 41 seconds
......@@ -12,9 +12,9 @@ function c12011029.initial_effect(c)
.e("SetCondition",function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) end)
.e("SetTarget",function (e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then
return Duel.IsExistingMatchingCard(c12011029.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end end)
return Duel.IsExistingMatchingCard(c12011029.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c12011029.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c12011029.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then Duel.Overlay(e:GetHandler(),g) end
end)
.Return()).c("RegisterEffect",iFunc(c)
......@@ -32,13 +32,13 @@ function c12011029.initial_effect(c)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then Duel.ConfirmCards(1-tp,g)
if Duel.SelectYesNo(tp,504) then
Duel.SendtoGrave(Duel.SelectMatchingCard(tp,function(c) return c:GetLevel()==3 and c:IsAbleToGrave() and c12011029.cfilter(c) end,tp,LOCATION_DECK,0,1,1,nil),REASON_EFFECT)
end
end
end end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
.e("SetRange",LOCATION_MZONE)
.e("SetCode",EVENT_DESTROYED)
.e("SetCode",EVENT_DESTROYED)
.e("SetProperty",EFFECT_FLAG_DELAY)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)if chk==0 then
return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......@@ -63,8 +63,8 @@ function c12011029.mcfilter(c)
end
function iFunc(c,x)
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) return iFunc(c,__this) end
local fe = function(name,...) if name =="RegisterEffect" then c:RegisterEffect(__this:Clone()) else (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) end return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
local func ={e = fe,Clone = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
end
......@@ -2,66 +2,66 @@
local m=4212211
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,function(c) return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK) and c:GetBaseAttack() <= 1000 end,3,3)
c:EnableReviveLimit()
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetProperty",EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
.e("SetType",EFFECT_TYPE_SINGLE)
.e("SetCode",EFFECT_SPSUMMON_CONDITION)
.e("SetValue",aux.xyzlimit)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_FIELD)
.e("SetRange",LOCATION_ONFIELD)
.e("SetTarget",function(e,c) return c~=e:GetHandler() and c:IsType(TYPE_EFFECT) end)
.e("SetTargetRange",LOCATION_MZONE,LOCATION_MZONE)
.e("SetCode",EFFECT_DISABLE)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_FIELD)
.e("SetCode",EFFECT_CANNOT_DISEFFECT)
.e("SetRange",LOCATION_ONFIELD)
.e("SetValue",function(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return te:GetHandler():IsType(TYPE_EFFECT) and bit.band(loc,LOCATION_MZONE)~=0
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_QUICK_F)
.e("SetCode",EVENT_CHAINING)
.e("SetRange",LOCATION_MZONE)
.e("SetCondition",function(e,tp,eg,ep,ev,re,r,rp)
return re:GetActivateLocation()==LOCATION_GRAVE end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsFacedown() then return end
Duel.Overlay(e:GetHandler(),re:GetHandler())
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetDescription",aux.Stringid(m,2))
.e("SetCategory",CATEGORY_DESTROY)
.e("SetType",EFFECT_TYPE_QUICK_O)
.e("SetCode",EVENT_FREE_CHAIN)
.e("SetRange",LOCATION_MZONE)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST) end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetChainLimit(aux.FALSE) end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end end)
.Return())
--xyz summon
aux.AddXyzProcedure(c,function(c) return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK) and c:GetBaseAttack() <= 1000 end,3,3)
c:EnableReviveLimit()
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetProperty",EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
.e("SetType",EFFECT_TYPE_SINGLE)
.e("SetCode",EFFECT_SPSUMMON_CONDITION)
.e("SetValue",aux.xyzlimit)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_FIELD)
.e("SetRange",LOCATION_ONFIELD)
.e("SetTarget",function(e,c) return c~=e:GetHandler() and c:IsType(TYPE_EFFECT) end)
.e("SetTargetRange",LOCATION_MZONE,LOCATION_MZONE)
.e("SetCode",EFFECT_DISABLE)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_FIELD)
.e("SetCode",EFFECT_CANNOT_DISEFFECT)
.e("SetRange",LOCATION_ONFIELD)
.e("SetValue",function(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return te:GetHandler():IsType(TYPE_EFFECT) and bit.band(loc,LOCATION_MZONE)~=0
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_QUICK_F)
.e("SetCode",EVENT_CHAINING)
.e("SetRange",LOCATION_MZONE)
.e("SetCondition",function(e,tp,eg,ep,ev,re,r,rp)
return re:GetActivateLocation()==LOCATION_GRAVE end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsFacedown() then return end
Duel.Overlay(e:GetHandler(),re:GetHandler())
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetDescription",aux.Stringid(m,2))
.e("SetCategory",CATEGORY_DESTROY)
.e("SetType",EFFECT_TYPE_QUICK_O)
.e("SetCode",EVENT_FREE_CHAIN)
.e("SetRange",LOCATION_MZONE)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST) end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetChainLimit(aux.FALSE) end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end end)
.Return())
end
function iFunc(c,x)
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) if name =="RegisterEffect" then c:RegisterEffect(__this:Clone()) else (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) end return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,Clone = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
end
\ No newline at end of file
......@@ -2,79 +2,79 @@
local m=4231001
local cm=_G["c"..m]
function cm.initial_effect(c)
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_TOGRAVE+CATEGORY_TOHAND)
.e("SetType",EFFECT_TYPE_QUICK_O)
.e("SetCode",EVENT_FREE_CHAIN)
.e("SetRange",LOCATION_MZONE)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)--return to hand as cost
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)--if normal spellcaster is onfield
if chk==0 then return iCount(0,tp,m,1)
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil,4231007) end
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_TOGRAVE+CATEGORY_TOHAND)
.e("SetType",EFFECT_TYPE_QUICK_O)
.e("SetCode",EVENT_FREE_CHAIN)
.e("SetRange",LOCATION_MZONE)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)--return to hand as cost
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)--if normal spellcaster is onfield
if chk==0 then return iCount(0,tp,m,1)
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil,4231007) end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
if Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_DECK)
end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)--choose if add to hand
local g = Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil,4231007)
if Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) and g:GetFirst():IsAbleToHand() then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) else Duel.SendtoGrave(g,REASON_EFFECT)
end
else
Duel.SendtoGrave(g,REASON_EFFECT)
end
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_IGNITION)
.e("SetRange",LOCATION_HAND)
.e("SetProperty",EFFECT_FLAG_CARD_TARGET)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return iCount(0,tp,m,2)
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,4231006)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
if Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_DECK)
end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)--choose if add to hand
local g = Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil,4231007)
if Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) and g:GetFirst():IsAbleToHand() then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) else Duel.SendtoGrave(g,REASON_EFFECT)
end
else
Duel.SendtoGrave(g,REASON_EFFECT)
end
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_IGNITION)
.e("SetRange",LOCATION_HAND)
.e("SetProperty",EFFECT_FLAG_CARD_TARGET)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return iCount(0,tp,m,2)
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,4231006)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
local g=Duel.SelectTarget(tp,Card.IsCode,tp,LOCATION_GRAVE,0,1,1,nil,4231006)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,4231006) and e:GetHandler():IsLocation(LOCATION_HAND) then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.GetFirstTarget()
Duel.Equip(tp,tc,e:GetHandler())
end
end
end)
.Return())
local g=Duel.SelectTarget(tp,Card.IsCode,tp,LOCATION_GRAVE,0,1,1,nil,4231006)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,4231006) and e:GetHandler():IsLocation(LOCATION_HAND) then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.GetFirstTarget()
Duel.Equip(tp,tc,e:GetHandler())
end
end
end)
.Return())
end
function cm.cfilter(c,code)
return c:IsCode(code) and (c:IsAbleToGrave() or (c:IsAbleToHand() and Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil)))
return c:IsCode(code) and (c:IsAbleToGrave() or (c:IsAbleToHand() and Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil)))
end
function cm.mfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_SPELLCASTER) and c:IsFaceup()
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_SPELLCASTER) and c:IsFaceup()
end
function iCount(name,tp,m,id)
return ((name=="get" or name=="set")
and {(name=="get"
and {tonumber(((Duel.GetFlagEffect(tp,m)==nil) and {0} or {Duel.GetFlagEffect(tp,m)})[1])}
or { Debug.Message("","请使用Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)") })[1]}
or {(bit.band(iCount("get",tp,m,id),math.pow(2,id-1))==0 and {true} or {false})[1]})[1]
return ((name=="get" or name=="set")
and {(name=="get"
and {tonumber(((Duel.GetFlagEffect(tp,m)==nil) and {0} or {Duel.GetFlagEffect(tp,m)})[1])}
or { Debug.Message("","请使用Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)") })[1]}
or {(bit.band(iCount("get",tp,m,id),math.pow(2,id-1))==0 and {true} or {false})[1]})[1]
end
function iFunc(c,x)
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) if name =="RegisterEffect" then c:RegisterEffect(__this:Clone()) else (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) end return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,Clone = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
end
\ No newline at end of file
......@@ -2,79 +2,79 @@
local m=4231002
local cm=_G["c"..m]
function cm.initial_effect(c)
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_TOGRAVE+CATEGORY_TOHAND)
.e("SetType",EFFECT_TYPE_QUICK_O)
.e("SetCode",EVENT_FREE_CHAIN)
.e("SetRange",LOCATION_MZONE)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)--return to hand as cost
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)--if normal spellcaster is onfield
if chk==0 then return iCount(0,tp,m,1)
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil,4231006) end
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_TOGRAVE+CATEGORY_TOHAND)
.e("SetType",EFFECT_TYPE_QUICK_O)
.e("SetCode",EVENT_FREE_CHAIN)
.e("SetRange",LOCATION_MZONE)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)--return to hand as cost
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)--if normal spellcaster is onfield
if chk==0 then return iCount(0,tp,m,1)
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil,4231006) end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
if Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_DECK)
end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)--choose if add to hand
local g = Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil,4231006)
if Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) and g:GetFirst():IsAbleToHand() then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) else Duel.SendtoGrave(g,REASON_EFFECT)
end
else
Duel.SendtoGrave(g,REASON_EFFECT)
end
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_IGNITION)
.e("SetRange",LOCATION_HAND)
.e("SetProperty",EFFECT_FLAG_CARD_TARGET)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return iCount(0,tp,m,2)
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,4231007)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
if Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_DECK)
end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)--choose if add to hand
local g = Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil,4231006)
if Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) and g:GetFirst():IsAbleToHand() then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) else Duel.SendtoGrave(g,REASON_EFFECT)
end
else
Duel.SendtoGrave(g,REASON_EFFECT)
end
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_IGNITION)
.e("SetRange",LOCATION_HAND)
.e("SetProperty",EFFECT_FLAG_CARD_TARGET)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return iCount(0,tp,m,2)
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,4231007)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
local g=Duel.SelectTarget(tp,Card.IsCode,tp,LOCATION_GRAVE,0,1,1,nil,4231007)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,4231007) and e:GetHandler():IsLocation(LOCATION_HAND) then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.GetFirstTarget()
Duel.Equip(tp,tc,e:GetHandler())
end
end
end)
.Return())
local g=Duel.SelectTarget(tp,Card.IsCode,tp,LOCATION_GRAVE,0,1,1,nil,4231007)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,4231007) and e:GetHandler():IsLocation(LOCATION_HAND) then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.GetFirstTarget()
Duel.Equip(tp,tc,e:GetHandler())
end
end
end)
.Return())
end
function cm.cfilter(c,code)
return c:IsCode(code) and (c:IsAbleToGrave() or (c:IsAbleToHand() and Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil)))
return c:IsCode(code) and (c:IsAbleToGrave() or (c:IsAbleToHand() and Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil)))
end
function cm.mfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_SPELLCASTER) and c:IsFaceup()
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_SPELLCASTER) and c:IsFaceup()
end
function iCount(name,tp,m,id)
return ((name=="get" or name=="set")
and {(name=="get"
and {tonumber(((Duel.GetFlagEffect(tp,m)==nil) and {0} or {Duel.GetFlagEffect(tp,m)})[1])}
or { Debug.Message("","请使用Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)") })[1]}
or {(bit.band(iCount("get",tp,m,id),math.pow(2,id-1))==0 and {true} or {false})[1]})[1]
return ((name=="get" or name=="set")
and {(name=="get"
and {tonumber(((Duel.GetFlagEffect(tp,m)==nil) and {0} or {Duel.GetFlagEffect(tp,m)})[1])}
or { Debug.Message("","请使用Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)") })[1]}
or {(bit.band(iCount("get",tp,m,id),math.pow(2,id-1))==0 and {true} or {false})[1]})[1]
end
function iFunc(c,x)
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) if name =="RegisterEffect" then c:RegisterEffect(__this:Clone()) else (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) end return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,Clone = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
end
\ No newline at end of file
......@@ -2,78 +2,78 @@
local m=4231003
local cm=_G["c"..m]
function cm.initial_effect(c)
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_IGNITION)
.e("SetRange",LOCATION_HAND)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD)
end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return iCount(0,tp,m,1)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_IGNITION)
.e("SetRange",LOCATION_HAND)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD)
end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return iCount(0,tp,m,1)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsLocation(LOCATION_HAND) then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)then
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_IGNITION)
.e("SetRange",LOCATION_MZONE)
.e("SetProperty",EFFECT_FLAG_CARD_TARGET)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.relfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.relfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST) end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return iCount(0,tp,m,2) and Duel.IsExistingMatchingCard(cm.deckfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsLocation(LOCATION_HAND) then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)then
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_IGNITION)
.e("SetRange",LOCATION_MZONE)
.e("SetProperty",EFFECT_FLAG_CARD_TARGET)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.relfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.relfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST) end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return iCount(0,tp,m,2) and Duel.IsExistingMatchingCard(cm.deckfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.deckfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end)
.Return())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.deckfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end)
.Return())
end
function cm.deckfilter(c,e,tp)
return (c:IsCode(4231001) or c:IsCode(4231002)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return (c:IsCode(4231001) or c:IsCode(4231002)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.relfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_NORMAL) and Duel.GetMZoneCount(tp,c,tp)>0
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_NORMAL) and Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function cm.thfilter(c)
return (c:IsCode(4231004) or c:IsCode(4231005)) and c:IsAbleToHand()
return (c:IsCode(4231004) or c:IsCode(4231005)) and c:IsAbleToHand()
end
function iCount(name,tp,m,id)
return ((name=="get" or name=="set")
and {(name=="get"
and {tonumber(((Duel.GetFlagEffect(tp,m)==nil) and {0} or {Duel.GetFlagEffect(tp,m)})[1])}
or { Debug.Message("","请使用Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)") })[1]}
or {(bit.band(iCount("get",tp,m,id),math.pow(2,id-1))==0 and {true} or {false})[1]})[1]
return ((name=="get" or name=="set")
and {(name=="get"
and {tonumber(((Duel.GetFlagEffect(tp,m)==nil) and {0} or {Duel.GetFlagEffect(tp,m)})[1])}
or { Debug.Message("","请使用Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)") })[1]}
or {(bit.band(iCount("get",tp,m,id),math.pow(2,id-1))==0 and {true} or {false})[1]})[1]
end
function iFunc(c,x)
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) if name =="RegisterEffect" then c:RegisterEffect(__this:Clone()) else (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) end return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,Clone = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
end
\ No newline at end of file
......@@ -2,74 +2,74 @@
local m=4231004
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_SINGLE)
.e("SetProperty",EFFECT_FLAG_SINGLE_RANGE)
.e("SetRange",LOCATION_MZONE)
.e("SetCode",EFFECT_BATTLE_DESTROY_REDIRECT)
.e("SetValue",LOCATION_REMOVED)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
.e("SetCode",EVENT_BATTLED)
.e("SetCondition",function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_BATTLE_DESTROYED) end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1660000)
bc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1660000)
bc:RegisterEffect(e2)
Duel.Damage(1-tp,bc:GetTextAttack()/2,REASON_BATTLE)
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_SINGLE)
.e("SetCode",EFFECT_SET_ATTACK_FINAL)
.e("SetProperty",EFFECT_FLAG_SINGLE_RANGE)
.e("SetRange",LOCATION_MZONE)
.e("SetCondition",function(e) local c = e:GetHandler() return
c:GetEquipGroup():IsExists(function(c) return c:IsCode(4231006) end,1,nil)
and c:GetEquipGroup():IsExists(function(c) return c:IsCode(4231007) end,1,nil) end)
.e("SetValue",function(e,c) return c:GetAttack()*2 end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
.e("SetCode",EVENT_CHAINING)
.e("SetProperty",EFFECT_FLAG_CANNOT_DISABLE)
.e("SetRange",LOCATION_MZONE)
.e("SetOperation",aux.chainreg)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetDescription",aux.Stringid(51481927,0))
.e("SetType",EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
.e("SetCode",EVENT_CHAIN_SOLVED)
.e("SetRange",LOCATION_MZONE)
.e("SetCondition",function(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and re:GetHandler()~=e:GetHandler() and e:GetHandler():GetFlagEffect(1)>0 end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if ep~=tp then return end
if Duel.Damage(tp,100,REASON_EFFECT) and c:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e:GetHandler():RegisterEffect(e1)
end end)
.Return())
c:EnableReviveLimit()
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_SINGLE)
.e("SetProperty",EFFECT_FLAG_SINGLE_RANGE)
.e("SetRange",LOCATION_MZONE)
.e("SetCode",EFFECT_BATTLE_DESTROY_REDIRECT)
.e("SetValue",LOCATION_REMOVED)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
.e("SetCode",EVENT_BATTLED)
.e("SetCondition",function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_BATTLE_DESTROYED) end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1660000)
bc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1660000)
bc:RegisterEffect(e2)
Duel.Damage(1-tp,bc:GetTextAttack()/2,REASON_BATTLE)
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_SINGLE)
.e("SetCode",EFFECT_SET_ATTACK_FINAL)
.e("SetProperty",EFFECT_FLAG_SINGLE_RANGE)
.e("SetRange",LOCATION_MZONE)
.e("SetCondition",function(e) local c = e:GetHandler() return
c:GetEquipGroup():IsExists(function(c) return c:IsCode(4231006) end,1,nil)
and c:GetEquipGroup():IsExists(function(c) return c:IsCode(4231007) end,1,nil) end)
.e("SetValue",function(e,c) return c:GetAttack()*2 end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
.e("SetCode",EVENT_CHAINING)
.e("SetProperty",EFFECT_FLAG_CANNOT_DISABLE)
.e("SetRange",LOCATION_MZONE)
.e("SetOperation",aux.chainreg)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetDescription",aux.Stringid(51481927,0))
.e("SetType",EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
.e("SetCode",EVENT_CHAIN_SOLVED)
.e("SetRange",LOCATION_MZONE)
.e("SetCondition",function(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and re:GetHandler()~=e:GetHandler() and e:GetHandler():GetFlagEffect(1)>0 end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if ep~=tp then return end
if Duel.Damage(tp,100,REASON_EFFECT) and c:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e:GetHandler():RegisterEffect(e1)
end end)
.Return())
end
function iFunc(c,x)
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) if name =="RegisterEffect" then c:RegisterEffect(__this:Clone()) else (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) end return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,Clone = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
end
\ No newline at end of file
......@@ -3,87 +3,87 @@ local m=4231005
local cm=_G["c"..m]
cm.fit_monster={4231004}
function cm.initial_effect(c)
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_ACTIVATE)
.e("SetCode",EVENT_FREE_CHAIN)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and ((ft>-1 and Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil,ft))
or (ft>0 and Duel.IsExistingMatchingCard(cm.mfilter,tp,0,LOCATION_MZONE,1,nil,ft)))
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then Duel.SetChainLimit(aux.FALSE) end end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=tg:GetFirst()
if tc then
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=Duel.SelectMatchingCard(tp,cm.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,ft)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=Duel.SelectMatchingCard(tp,cm.mfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetDescription",aux.Stringid(m,0))
.e("SetCategory",CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_IGNITION)
.e("SetRange",LOCATION_GRAVE)
.e("SetCountLimit",1,m)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local mg=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if mg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=mg:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end)
.Return())
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_ACTIVATE)
.e("SetCode",EVENT_FREE_CHAIN)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and ((ft>-1 and Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil,ft))
or (ft>0 and Duel.IsExistingMatchingCard(cm.mfilter,tp,0,LOCATION_MZONE,1,nil,ft)))
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then Duel.SetChainLimit(aux.FALSE) end end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=tg:GetFirst()
if tc then
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=Duel.SelectMatchingCard(tp,cm.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,ft)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=Duel.SelectMatchingCard(tp,cm.mfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetDescription",aux.Stringid(m,0))
.e("SetCategory",CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_IGNITION)
.e("SetRange",LOCATION_GRAVE)
.e("SetCountLimit",1,m)
.e("SetCost",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local mg=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if mg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=mg:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end)
.Return())
end
function cm.cfilter(c,e,tp)
return c:IsCode(4231004) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
return c:IsCode(4231004) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
end
function cm.cfilter2(c,e,tp)
return c:IsCode(4231000) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SPECIAL,tp,false,false)
return c:IsCode(4231000) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SPECIAL,tp,false,false)
end
function cm.thfilter(c)
return c:IsCode(4231004) and c:IsAbleToHand()
return c:IsCode(4231004) and c:IsAbleToHand()
end
function cm.mfilter(c,ft)
return c:GetEquipGroup():IsExists(function(c) return c:IsCode(4231006) end,1,nil)
and c:GetEquipGroup():IsExists(function(c) return c:IsCode(4231007) end,1,nil)
and (not((c:GetSequence()==5 or c:GetSequence()==6)and ft<=0) or ft>0)
return c:GetEquipGroup():IsExists(function(c) return c:IsCode(4231006) end,1,nil)
and c:GetEquipGroup():IsExists(function(c) return c:IsCode(4231007) end,1,nil)
and (not((c:GetSequence()==5 or c:GetSequence()==6)and ft<=0) or ft>0)
end
function iFunc(c,x)
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) if name =="RegisterEffect" then c:RegisterEffect(__this:Clone()) else (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) end return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,Clone = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
end
This diff is collapsed.
This diff is collapsed.
......@@ -2,72 +2,72 @@
local m=4231008
local cm=_G["c"..m]
function cm.initial_effect(c)
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_SINGLE)
.e("SetCode",EFFECT_EQUIP_LIMIT)
.e("SetProperty",EFFECT_FLAG_CANNOT_DISABLE)
.e("SetValue",function(e,c)return c:IsRace(RACE_SPELLCASTER) end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_EQUIP)
.e("SetCode",EFFECT_EXTRA_ATTACK)
.e("SetProperty",EFFECT_FLAG_CANNOT_DISABLE)
.e("SetRange",LOCATION_SZONE)
.e("SetValue",function(e)return e:GetHandler():GetEquipTarget():GetEquipCount()-1 end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_ACTIVATE)
.e("SetCode",EVENT_FREE_CHAIN)
.e("SetProperty",EFFECT_FLAG_CARD_TARGET)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.eqfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingTarget(cm.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,cm.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if Duel.Equip(tp,c,tc)~=0 then
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil,e)
if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end
end
end end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_TOHAND)
.e("SetType",EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
.e("SetCode",EVENT_EQUIP)
.e("SetRange",0xff)
.e("SetProperty",EFFECT_FLAG_DELAY)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if e:GetHandler():GetEquipTarget()==nil then return false end
if chk==0 then return iCount(0,tp,m,1) and e:GetHandler():GetEquipTarget():IsType(TYPE_NORMAL)
and eg:IsContains(e:GetHandler())
and Duel.IsExistingMatchingCard(cm.gfilter,tp,LOCATION_GRAVE,0,1,nil) end
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_SINGLE)
.e("SetCode",EFFECT_EQUIP_LIMIT)
.e("SetProperty",EFFECT_FLAG_CANNOT_DISABLE)
.e("SetValue",function(e,c)return c:IsRace(RACE_SPELLCASTER) end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_EQUIP)
.e("SetCode",EFFECT_EXTRA_ATTACK)
.e("SetProperty",EFFECT_FLAG_CANNOT_DISABLE)
.e("SetRange",LOCATION_SZONE)
.e("SetValue",function(e)return e:GetHandler():GetEquipTarget():GetEquipCount()-1 end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_ACTIVATE)
.e("SetCode",EVENT_FREE_CHAIN)
.e("SetProperty",EFFECT_FLAG_CARD_TARGET)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.eqfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingTarget(cm.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,cm.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if Duel.Equip(tp,c,tc)~=0 then
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil,e)
if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end
end
end end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_TOHAND)
.e("SetType",EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
.e("SetCode",EVENT_EQUIP)
.e("SetRange",0xff)
.e("SetProperty",EFFECT_FLAG_DELAY)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if e:GetHandler():GetEquipTarget()==nil then return false end
if chk==0 then return iCount(0,tp,m,1) and e:GetHandler():GetEquipTarget():IsType(TYPE_NORMAL)
and eg:IsContains(e:GetHandler())
and Duel.IsExistingMatchingCard(cm.gfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
local g = Duel.SelectMatchingCard(tp,cm.gfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end)
.Return())
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
local g = Duel.SelectMatchingCard(tp,cm.gfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end)
.Return())
end
function cm.cfilter(c)
return c:IsCode(4231005) and c:IsAbleToHand()
return c:IsCode(4231005) and c:IsAbleToHand()
end
function cm.gfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.eqfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)
end
function iCount(name,tp,m,id)
return ((name=="get" or name=="set")
and {(name=="get"
and {tonumber(((Duel.GetFlagEffect(tp,m)==nil) and {0} or {Duel.GetFlagEffect(tp,m)})[1])}
or { Debug.Message("","请使用Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)") })[1]}
or {(bit.band(iCount("get",tp,m,id),math.pow(2,id-1))==0 and {true} or {false})[1]})[1]
return ((name=="get" or name=="set")
and {(name=="get"
and {tonumber(((Duel.GetFlagEffect(tp,m)==nil) and {0} or {Duel.GetFlagEffect(tp,m)})[1])}
or { Debug.Message("","请使用Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)") })[1]}
or {(bit.band(iCount("get",tp,m,id),math.pow(2,id-1))==0 and {true} or {false})[1]})[1]
end
function iFunc(c,x)
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
local fe = function(name,...) if name =="RegisterEffect" then c:RegisterEffect(__this:Clone()) else (type(__this[name])=="function" and {__this[name]} or {""})[1](__this,...) end return iFunc(c,__this) end
local fc = function(name,...) this = (type(c[name])=="function" and {c[name]} or {""})[1](c,...) return iFunc(c,c) end
local func ={e = fe,Clone = fe,c = fc,g = fc,v = function() return this end,Return = function() return __this:Clone() end}
return func
end
\ No newline at end of file
This diff is collapsed.
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