Commit 610ee2b8 authored by Satty's avatar Satty

fix

parent ea7c598a
...@@ -8,7 +8,7 @@ function cm.initial_effect(c) ...@@ -8,7 +8,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_BATTLED) e1:SetCode(EVENT_BATTLED)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e1:SetCondition(cm.con1) e1:SetCondition(cm.con1)
e1:SetTarget(cm.tg1) e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1) e1:SetOperation(cm.op1)
...@@ -47,6 +47,7 @@ function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,6 +47,7 @@ function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0)
Duel.SetChainLimit(aux.FALSE)
end end
function cm.op1(e,tp,eg,ep,ev,re,r,rp) function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject() local bc=e:GetLabelObject()
......
...@@ -33,6 +33,14 @@ function cm.initial_effect(c) ...@@ -33,6 +33,14 @@ function cm.initial_effect(c)
e3:SetTarget(cm.settg2) e3:SetTarget(cm.settg2)
e3:SetOperation(cm.setop2) e3:SetOperation(cm.setop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SWAP_AD)
e4:SetCondition(cm.con)
c:RegisterEffect(e4)
end
function cm.con(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,18700965)
end end
function cm.xyzop(e,tp,chk) function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
......
--黑月执事 亚弗洛蒙 --黑月执事 亚弗洛蒙
local cm, m, o = GetID()
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,cm.mfilter,cm.xyzcheck,2,2,cm.ovfilter,aux.Stringid(m,0),cm.xyzop)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_XMATERIAL)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
e3:SetCondition(cm.con)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetType(EFFECT_TYPE_IGNITION+EFFECT_TYPE_XMATERIAL)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.con)
e4:SetTarget(cm.ovtg)
e4:SetOperation(cm.ovop)
c:RegisterEffect(e4)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 and Duel.IsExistingMatchingCard(cm.qifilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,3,nil) end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,cm.qifilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,3,3,nil)
Duel.ConfirmCards(1-tp,g)
end
function cm.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ)
end
function cm.xyzcheck(g)
return g:GetClassCount(Card.GetRank)==1
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsLevelBelow(6)
end
function cm.qifilter(c)
return c:IsSetCard(0x822)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSetCard(0x3822)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.thfilter(c)
return c:IsSetCard(0x3822) and c:IsAbleToHand()
end
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) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(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,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.filter(c)
return c:IsSetCard(0x3822) and c:IsLocation(LOCATION_GRAVE)
end
function cm.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
end
function cm.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.Overlay(c,g)
end
end
\ No newline at end of file
...@@ -21,16 +21,26 @@ function cm.initial_effect(c) ...@@ -21,16 +21,26 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_LEAVE_GRAVE) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m+o) e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg) e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop) e2:SetOperation(cm.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DISCARD)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(rp,m+1,RESET_PHASE+PHASE_END,0,1)
end end
function cm.handcon(e,tp,eg,ep,ev,re,r,rp) function cm.handcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m+1)<3 return Duel.GetFlagEffect(tp,m+1)<=3
end end
......
--创导龙裔·构形者 --创导龙裔·构形者
dofile("expansions/script/c20000450.lua") dofile("expansions/script/c20000450.lua")
fu_GD.N_initial("GA", "DG", "IsCode", 464) local func = fugf.GetNoP("DG", "IsCode", 464)
\ No newline at end of file local pe = fuef.STO("DR"):RAN("H"):PRO("DAM"):CTL("m"):Func("p_con1,N_cos1,N_tg1(%1),N_op1(%1)", func)
local cm, m = fuef.initial(fu_GD, _glo, "public_effect", pe)
cm.e1 = fuef.FC("DR"):RAN("H"):Func("SelfDraw_con,N_op2")
--pe
function cm.p_con1(e,tp,eg,ep,ev,re,r,rp)
return (r & REASON_EFFECT == REASON_EFFECT) and fucf.Filter(re:GetHandler(), "IsSet+IsTyp", "bfd4,M")
end
\ No newline at end of file
...@@ -5,7 +5,7 @@ cm.e1 = fuef.A():CAT("REL+SP+EQ"):Func("tg1,op1") ...@@ -5,7 +5,7 @@ cm.e1 = fuef.A():CAT("REL+SP+EQ"):Func("tg1,op1")
cm.e2 = fuef.I():CAT("EQ"):RAN("G"):PRO("TG"):Func("bfgcost,tg2,op2") cm.e2 = fuef.I():CAT("EQ"):RAN("G"):PRO("TG"):Func("bfgcost,tg2,op2")
--e1 --e1
function cm.tg1f2(c, tp) function cm.tg1f2(c, tp)
return fucf.Filter(c, "IsLoc+IsPublic", "H") and fugf.GetFilter(tp, "HG", "CanEq+IsLv+Not", {tp, -c:GetLevel(), c}, 1) return fucf.Filter(c, "IsLoc+IsPublic", "H") and fugf.GetFilter(tp, "HG", "IsTyp+IsRac+CanEq+IsLv+Not", {"RI+M,DR", tp, -c:GetLevel(), c}, 1)
end end
function cm.tg1f(rc, e, tp, mg) function cm.tg1f(rc, e, tp, mg)
if not fucf.Filter(rc, "IsTyp+IsCode+CanSp", "RI+M,463", {e, "RI", tp}) then return false end if not fucf.Filter(rc, "IsTyp+IsCode+CanSp", "RI+M,463", {e, "RI", tp}) then return false end
...@@ -16,9 +16,6 @@ function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -16,9 +16,6 @@ function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return fugf.GetFilter(tp,"D",cm.tg1f,{e,tp,Duel.GetRitualMaterial(tp)},1) end if chk==0 then return fugf.GetFilter(tp,"D",cm.tg1f,{e,tp,Duel.GetRitualMaterial(tp)},1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function cm.op1con1(e)
return e:GetHandler():GetEquipCount() == 0
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp) function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local mg = Duel.GetRitualMaterial(tp) local mg = Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -34,9 +31,10 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,9 +31,10 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
rc:CompleteProcedure() rc:CompleteProcedure()
local mc = mg:GetFirst() local mc = mg:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
mc = fugf.Select(tp, "HG", "CanEq+IsLv", {tp, -mc:GetLevel()}):GetFirst() mc = fugf.Select(tp, "HG", "IsTyp+IsRac+CanEq+IsLv", {"RI+M,DR", tp, -mc:GetLevel()}):GetFirst()
fusf.Equip(e,tp,mc,rc) fusf.Equip(e,tp,mc,rc)
fuef.S(e, EFFECT_SELF_DESTROY, rc):PRO("SR"):RAN("M"):CON("op1con1"):RES("STD") local selfdescon = function(e) return e:GetHandler():GetEquipCount() == 0 end
fuef.S(e, EFFECT_SELF_DESTROY, rc):PRO("SR"):RAN("M"):CON(selfdescon):RES("STD")
end end
--e2 --e2
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -2,35 +2,35 @@ dofile("expansions/script/c20099998.lua") ...@@ -2,35 +2,35 @@ dofile("expansions/script/c20099998.lua")
if fucf then return end if fucf then return end
fucf, fugf = { }, { } fucf, fugf = { }, { }
-------------------------------------- Group function -------------------------------------- Group function
function fugf.Get(_tp, _loc) function fugf.Get(p, loc)
return Duel.GetFieldGroup(_tp, fusf.Get_Loc(_loc)) return Duel.GetFieldGroup(p, fusf.Get_Loc(loc))
end end
function fugf.Filter(_g, _func, _val, _n, ...) function fugf.Filter(g, f, v, n, ...)
return fusf.Creat_GF(_func, _val, ...)(_g, _n) return fusf.Creat_GF(f, v, ...)(g, n)
end end
function fugf.GetFilter(_tp, _loc, _func, _val, _n, ...) function fugf.GetFilter(p, loc, f, v, n, ...)
return fugf.Filter(fugf.Get(_tp, _loc), _func, _val, _n, ...) return fugf.Filter(fugf.Get(p, loc), f, v, n, ...)
end end
function fugf.GetNoP(_loc, _func, _val, _n, ...) function fugf.GetNoP(loc, f, v, n, ...)
local val = {...} local val = {...}
return function(_tp) return function(p)
return fugf.GetFilter(_tp, _loc, _func, _val, _n, table.unpack(val)) return fugf.GetFilter(p, loc, f, v, n, table.unpack(val))
end end
end end
function fugf.Select(_tp, _g, _func, _val, _min, _max, ...) function fugf.Select(p, g, f, v, min, max, ...)
local g = _g if type(g) == "string" then g = fugf.Get(p, g) end -- _g is loc
if type(_g) == "string" then g = fugf.Get(_tp, _g) end -- _g is loc if type(f) == "number" then -- f is min
if _func then min, max = f, v
if type(_func) == "number" then -- _func is _min elseif f then -- f is func
_min, _max = _func, _val or _func g = fugf.Filter(g, f, v, nil, ...)
else -- _func is _func
g = fugf.Filter(g, _func, _val, nil, ...)
end end
end min = min or 1
return g:Select(_tp, _min or 1, _max or _min or 1, nil) max = max or min
if #g == min then return g end
return g:Select(p, min, max, nil)
end end
function fugf.SelectTg(_tp, _g, _func, _val, _min, _max, ...) function fugf.SelectTg(p, g, f, v, min, max, ...)
local g = fugf.Select(_tp, _g, _func, _val, _min, _max, ...) local g = fugf.Select(p, g, f, v, min, max, ...)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
return g return g
end end
......
...@@ -459,7 +459,6 @@ function fusf.GetFlag(val, cod) -- val : Card|Effect|player(number) ...@@ -459,7 +459,6 @@ function fusf.GetFlag(val, cod) -- val : Card|Effect|player(number)
end end
function fusf.Equip(e,tp,ec,c) function fusf.Equip(e,tp,ec,c)
if not (ec and c and Duel.Equip(tp, ec, c)) then return false end if not (ec and c and Duel.Equip(tp, ec, c)) then return false end
local eq = function(e, c) return e:GetOwner() == c end local eq = function(e, c) return c == e:GetLabelObject() end
fuef.S(e, EFFECT_EQUIP_LIMIT, ec):PRO(EFFECT_FLAG_OWNER_RELATE):VAL(eq):RES("STD") return fuef.S(e, EFFECT_EQUIP_LIMIT, ec):PRO("CD"):VAL(eq):OBJ(c):RES("STD")
return true
end end
\ No newline at end of file
...@@ -23,6 +23,7 @@ function s.initial_effect(c) ...@@ -23,6 +23,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetCondition(s.xyzcon) e2:SetCondition(s.xyzcon)
e2:SetTarget(s.xyztg) e2:SetTarget(s.xyztg)
......
...@@ -41,10 +41,10 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,10 +41,10 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function s.thcon(e,tp) function s.thcon(e,tp)
return not Duel.IsExistingMatchingCard(s.sofilter,tp,LOCATION_HAND,0,1,nil) return not Duel.IsExistingMatchingCard(s.psofilter,tp,LOCATION_HAND,0,1,nil)
end end
function s.thcon3(e,tp) function s.thcon3(e,tp)
return not Duel.IsExistingMatchingCard(s.sofilter,tp,LOCATION_HAND,0,1,nil) return Duel.IsExistingMatchingCard(s.psofilter,tp,LOCATION_HAND,0,1,nil)
end end
function s.sofilter(c) function s.sofilter(c)
return c:IsCode(31750173) and not c:IsPublic() return c:IsCode(31750173) and not c:IsPublic()
......
...@@ -22,7 +22,7 @@ function s.initial_effect(c) ...@@ -22,7 +22,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHANGE_POS) e2:SetCode(EVENT_CHANGE_POS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetCondition(s.descon) e2:SetCondition(s.descon)
e2:SetTarget(s.destg) e2:SetTarget(s.destg)
...@@ -89,8 +89,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,8 +89,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local np=c:GetPosition() local np=c:GetPosition()
local pp=c:GetPreviousPosition() local pp=c:GetPreviousPosition()
return (np==POS_FACEUP_ATTACK or np==POS_ATTACK) return np&POS_FACEUP~=0
and not ((pp==POS_FACEUP_ATTACK) or (pp==POS_ATTACK))
end end
-- ② 破坏目标选择 -- ② 破坏目标选择
......
...@@ -29,6 +29,7 @@ function s.initial_effect(c) ...@@ -29,6 +29,7 @@ function s.initial_effect(c)
e5:SetDescription(aux.Stringid(id,1)) e5:SetDescription(aux.Stringid(id,1))
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS) e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN) e5:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e5:SetCondition(s.condition) e5:SetCondition(s.condition)
......
...@@ -26,6 +26,7 @@ function s.initial_effect(c) ...@@ -26,6 +26,7 @@ function s.initial_effect(c)
-- --
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
--ct tg op --ct tg op
e2:SetCost(s.e2ct) e2:SetCost(s.e2ct)
...@@ -96,6 +97,7 @@ function s.e2op(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,6 +97,7 @@ function s.e2op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(0) e1:SetValue(0)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
......
...@@ -110,15 +110,15 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -110,15 +110,15 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
-- --
function s.sckfilter(c) function s.sckfilter(c,tp)
return c:GetOwner()~=c:GetControler() return c:IsPreviousControler(tp) and c:GetOwner()==1-tp and c:IsPreviousLocation(LOCATION_MZONE)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return Duel.GetFlagEffect(tp,id)>0 return Duel.GetFlagEffect(tp,id)>0
end end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp) function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.sckfilter,1,nil) return eg:IsExists(s.sckfilter,1,nil,tp)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() and Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return e:GetHandler():IsAbleToHand() and Duel.IsPlayerCanDraw(tp,1) end
......
...@@ -3,7 +3,7 @@ local s,id=GetID() ...@@ -3,7 +3,7 @@ local s,id=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionCode,52700747),aux.FilterBoolFunction(Card.IsRace,RACE_WYRM),true) aux.AddFusionProcCodeFun(c,52700747,aux.FilterBoolFunction(Card.IsRace,RACE_WYRM),1,true,true)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -3,7 +3,7 @@ local s,id=GetID() ...@@ -3,7 +3,7 @@ local s,id=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionCode,52700747),s.matfilter,true) aux.AddFusionProcCodeFun(c,52700747,s.matfilter,1,true,true)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -3,7 +3,7 @@ local s,id=GetID() ...@@ -3,7 +3,7 @@ local s,id=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionCode,52700741),s.matfilter,true) aux.AddFusionProcCodeFun(c,52700741,s.matfilter,1,true,true)
--control --control
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL) e1:SetCategory(CATEGORY_CONTROL)
......
...@@ -103,17 +103,17 @@ function s.checkop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -103,17 +103,17 @@ function s.checkop2(e,tp,eg,ep,ev,re,r,rp)
end end
end end
-- --
function s.cfilter(c) function s.cfilter1(c,tp)
return c:IsFaceup() and c:IsFusionType(TYPE_MONSTER) and ((c:IsSetCard(0x3529) and c:IsRace(RACE_WYRM)) or c:GetOwner()==1-tp) return c:IsFaceup() and c:IsFusionType(TYPE_MONSTER) and ((c:IsSetCard(0x3529) and c:IsRace(RACE_WYRM)) or c:GetOwner()==1-tp)
end end
function s.cfilter2(c) function s.cfilter2(c)
return c:IsFaceup() and c:IsFusionType(TYPE_MONSTER) and c:IsSetCard(0x3529) and c:IsRace(RACE_WYRM) and c:IsType(TYPE_FUSION) return c:IsFaceup() and c:IsFusionType(TYPE_MONSTER) and c:IsSetCard(0x3529) and c:IsRace(RACE_WYRM) and c:IsType(TYPE_FUSION)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and not Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_MZONE,0,1,nil) and not Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil)
end end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp) function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
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