Commit 5589f090 authored by POLYMER's avatar POLYMER

fix

parent 3fb41a03
--蒹葭苍苍 --蒹葭苍苍
local cm, m, ofs = GetID() local cm, m, ofs = GetID()
local yr = 13020010 local yr = 13020010
xpcall(function() dofile("expansions/script/c16670000.lua") end,function() dofile("script/c16670000.lua") end) xpcall(function() dofile("expansions/script/c16670000.lua") end, function() dofile("script/c16670000.lua") end)
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c, yr) aux.AddCodeList(c, yr)
--Activate --Activate
...@@ -31,8 +31,9 @@ end ...@@ -31,8 +31,9 @@ end
function cm.filter(c) function cm.filter(c)
return aux.IsCodeListed(c, yr) and c:IsAbleToHand() return aux.IsCodeListed(c, yr) and c:IsAbleToHand()
end end
function cm.filter2(c,e,tp)
return c:IsType(TYPE_EQUIP) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) function cm.filter2(c, e, tp)
return c:IsType(TYPE_EQUIP) and c:IsCanBeSpecialSummoned(e, 0, tp, true, false)
end end
function cm.target(e, tp, eg, ep, ev, re, r, rp, chk) function cm.target(e, tp, eg, ep, ev, re, r, rp, chk)
...@@ -66,49 +67,30 @@ end ...@@ -66,49 +67,30 @@ end
function cm.sptg2(e, tp, eg, ep, ev, re, r, rp, chk, chkc) function cm.sptg2(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsType(TYPE_SPELL + TYPE_EQUIP) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsType(TYPE_SPELL + TYPE_EQUIP) end
local kx,zzx,sxx,zzjc,sxjc,zzl=it.sxbl() local kx, zzx, sxx, zzjc, sxjc, zzl = it.sxbl()
if chk == 0 then return Duel.IsExistingTarget(cm.filter2, tp, LOCATION_GRAVE, 0, 1, nil,e,tp) and zzx>0 end if chk == 0 then return Duel.IsExistingTarget(cm.filter2, tp, LOCATION_GRAVE, 0, 1, nil, e, tp) and zzx > 0 end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local g = Duel.SelectTarget(tp, cm.filter2, tp, LOCATION_GRAVE, 0, 1, 1, nil,e,tp) local g = Duel.SelectTarget(tp, cm.filter2, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
local zz,sx,lv=it.sxblx(tp,kx,zzx,sxx,zzl) local zz, sx, lv = it.sxblx(tp, kx, zzx, sxx, zzl)
e:SetLabel(zz,sx,lv) e:SetLabel(zz, sx, lv)
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g, 1, 0, 0) Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g, 1, 0, 0)
end end
function cm.spop2(e, tp, eg, ep, ev, re, r, rp) function cm.spop2(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
local tc=Duel.GetFirstTarget() local tc = Duel.GetFirstTarget()
local zz,sx,lv=e:GetLabel() local zz, sx, lv = e:GetLabel()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if not Duel.IsPlayerCanSpecialSummonMonster(tp,tc:GetCode(),0,TYPE_NORMAL+TYPE_MONSTER,0,0,lv,zz,sx) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp, tc:GetCode(), 0, TYPE_NORMAL + TYPE_MONSTER, 0, 0, lv, zz, sx) then return end
tc:AddMonsterAttribute(TYPE_NORMAL+TYPE_MONSTER,sx,zz,lv,0,0) tc:AddMonsterAttribute(TYPE_NORMAL + TYPE_MONSTER, sx, zz, lv, 0, 0)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(tc, 0, tp, tp, true, false, POS_FACEUP_DEFENSE)
local e3=Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_REDIRECT) e3:SetReset(RESET_EVENT + RESETS_REDIRECT)
e3:SetValue(LOCATION_REMOVED) e3:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e3,true) tc:RegisterEffect(e3, true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(cm.atkval)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,e:GetHandlerPlayer(),LOCATION_GRAVE+LOCATION_REMOVED,0,nil)*500
end
function cm.atkfilter(c)
return aux.IsCodeListed(c, yr) and c:IsType(TYPE_EQUIP)
end
...@@ -4,111 +4,117 @@ local yr = 13020010 ...@@ -4,111 +4,117 @@ local yr = 13020010
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c, yr) aux.AddCodeList(c, yr)
c:SetSPSummonOnce(m) c:SetSPSummonOnce(m)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFun2(c,cm.filter66,aux.FilterBoolFunction(Card.IsType,TYPE_EFFECT),true) aux.AddFusionProcCodeFunRep(c, 13020000, aux.FilterBoolFunction(Card.IsType, TYPE_EFFECT), 1, 127, true, true)
local e1=cm.AddContactFusionProcedure(c,cm.ffilter,LOCATION_ONFIELD+LOCATION_HAND,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_MATERIAL):SetValue(SUMMON_VALUE_SELF) local e1 = aux.AddContactFusionProcedure(c, cm.ffilter, LOCATION_ONFIELD + LOCATION_HAND, 0, Duel.Remove, POS_FACEUP,
REASON_COST + REASON_MATERIAL):SetValue(SUMMON_VALUE_SELF)
local e2=Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetOperation(cm.desop) e2:SetOperation(cm.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13000766,1)) e3:SetDescription(aux.Stringid(13000766, 1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED) e3:SetRange(LOCATION_GRAVE + LOCATION_REMOVED)
e3:SetCondition(cm.descon) e3:SetCondition(cm.descon)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
e3:SetOperation(cm.desop2) e3:SetOperation(cm.desop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.filter66(c)
return aux.IsCodeListed(c, yr) function cm.ffilter(c, fc, sub, mg, sg)
end return c:IsAbleToRemoveAsCost() and (c:GetOriginalType() & TYPE_UNION ~= 0 or c:GetOriginalType() & TYPE_EQUIP ~= 0)
function cm.ffilter(c,fc,sub,mg,sg)
return c:IsAbleToRemoveAsCost() and (c:GetOriginalType()&TYPE_UNION~=0 or c:GetOriginalType()&TYPE_EQUIP~=0)
end end
function cm.filter(c,c2)
function cm.filter(c, c2)
return c:IsType(TYPE_EQUIP) and not c:IsForbidden() and aux.IsCodeListed(c, yr) and c:CheckEquipTarget(c2) return c:IsType(TYPE_EQUIP) and not c:IsForbidden() and aux.IsCodeListed(c, yr) and c:CheckEquipTarget(c2)
end end
function cm.AddContactFusionProcedure(c,filter,self_location,opponent_location,mat_operation,...) function aux.AddContactFusionProcedure(c, filter, self_location, opponent_location, mat_operation, ...)
self_location=self_location or 0 self_location = self_location or 0
opponent_location=opponent_location or 0 opponent_location = opponent_location or 0
local operation_params={...} local operation_params = { ... }
local e2=Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA) e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.ContactFusionCondition(filter,self_location,opponent_location)) e2:SetCondition(cm.ContactFusionCondition(filter, self_location, opponent_location))
e2:SetOperation(cm.ContactFusionOperation(filter,self_location,opponent_location,mat_operation,operation_params)) e2:SetOperation(cm.ContactFusionOperation(filter, self_location, opponent_location, mat_operation, operation_params))
c:RegisterEffect(e2) c:RegisterEffect(e2)
return e2 return e2
end end
function cm.ContactFusionMaterialFilter(c,fc,filter)
return c:IsCanBeFusionMaterial(fc,SUMMON_TYPE_SPECIAL) and (not filter or filter(c,fc)) function cm.ContactFusionMaterialFilter(c, fc, filter)
return c:IsCanBeFusionMaterial(fc, SUMMON_TYPE_SPECIAL) and (not filter or filter(c, fc))
end end
function cm.ContactFusionCondition(filter,self_location,opponent_location)
return function(e,c) function cm.ContactFusionCondition(filter, self_location, opponent_location)
if c==nil then return true end return function(e, c)
if c == nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler() local tp = c:GetControler()
local mg=Duel.GetMatchingGroup(cm.ContactFusionMaterialFilter,tp,self_location,opponent_location,c,c,filter) local mg = Duel.GetMatchingGroup(cm.ContactFusionMaterialFilter, tp, self_location, opponent_location, c, c,
return #mg>=2 filter)
return #mg >= 2
end end
end end
function cm.ContactFusionOperation(filter,self_location,opponent_location,mat_operation,operation_params)
return function(e,tp,eg,ep,ev,re,r,rp,c) function cm.ContactFusionOperation(filter, self_location, opponent_location, mat_operation, operation_params)
local mg=Duel.GetMatchingGroup(cm.ContactFusionMaterialFilter,tp,self_location,opponent_location,c,c,filter) return function(e, tp, eg, ep, ev, re, r, rp, c)
local g=mg:Select(tp, 2, 2, nil) local mg = Duel.GetMatchingGroup(cm.ContactFusionMaterialFilter, tp, self_location, opponent_location, c, c,
filter)
local g = mg:Select(tp, 2, 2, nil)
c:SetMaterial(g) c:SetMaterial(g)
mat_operation(g,table.unpack(operation_params)) mat_operation(g, table.unpack(operation_params))
end end
end end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
function cm.desop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,c) local g = Duel.SelectMatchingCard(tp, cm.filter, tp, LOCATION_GRAVE + LOCATION_DECK, 0, 1, 1, nil, c)
if g:GetCount()>0 then if g:GetCount() > 0 then
g=g:GetFirst() g = g:GetFirst()
local mg=Group.CreateGroup() local mg = Group.CreateGroup()
mg:AddCard(c) mg:AddCard(c)
local g2=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) local g2 = Duel.GetMatchingGroup(cm.TRUE, tp, 0, LOCATION_MZONE, nil)
mg:Merge(g2) mg:Merge(g2)
local tc=c local tc = c
if g:IsLocation(LOCATION_GRAVE) and #mg>1 then if g:IsLocation(LOCATION_GRAVE) and #mg > 1 then
tc=mg:Select(tp, 1, 1, nil):GetFirst() tc = mg:Select(tp, 1, 1, nil):GetFirst()
Duel.Equip(tp,g,tc,true)
else
Duel.Equip(tp,g,tc,true)
end end
Duel.Equip(tp, g, tc, true, true)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Remove(c, POS_FACEUP,REASON_EFFECT) Duel.Remove(c, POS_FACEUP, REASON_EFFECT)
end end
end end
function cm.cfilter(c,tp) function cm.cfilter(c, tp)
return c:IsPreviousControler(tp) return c:IsPreviousControler(tp)
and c:GetReasonPlayer()==1-tp and c:GetReasonPlayer() == 1 - tp
end end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler()) function cm.descon(e, tp, eg, ep, ev, re, r, rp)
return eg:IsExists(cm.cfilter, 1, nil, tp) and not eg:IsContains(e:GetHandler())
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end function cm.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
local c=e:GetHandler() if chk == 0 then return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) local c = e:GetHandler()
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0)
end end
function cm.desop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() function cm.desop2(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
end end
--所谓伊人 --所谓伊人
local cm, m, ofs = GetID() local cm, m, ofs = GetID()
local yr = 13020010 local yr = 13020010
xpcall(function() dofile("expansions/script/c16670000.lua") end,function() dofile("script/c16670000.lua") end)--引用库 xpcall(function() dofile("expansions/script/c16670000.lua") end, function() dofile("script/c16670000.lua") end) --引用库
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c, yr) aux.AddCodeList(c, yr)
local e0=Effect.CreateEffect(c) local e1 = xg.epp2(c, m, 1, nil, 3, QY_sp, cm.setcon2, cm.cost, cm.target, cm.operation, true) --使用库内函数进行便捷注册
e0:SetCategory(CATEGORY_EQUIP) local e2 = e1:Clone()
e0:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e0:SetRange(LOCATION_HAND) e2:SetCode(EVENT_FREE_CHAIN)
e0:SetCode(EVENT_FREE_CHAIN) e2:SetLabel(m)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(cm.setcon)
e0:SetCost(cm.cost) c:RegisterEffect(e2)
e0:SetCondition(cm.setcon) local e3 = xg.epp2(c, m, 4, EVENT_EQUIP, nil, QY_md + QY_cw, cm.setcon3, nil, nil, cm.operation2, true)
e0:SetTarget(cm.target) e3:SetCountLimit(1, EFFECT_COUNT_CODE_CHAIN)
e0:SetOperation(cm.operation) if cm.gl == nil then
c:RegisterEffect(e0) cm.gl = true
local e3=xg.epp2(c,m,4,EVENT_EQUIP,nil,QY_md+QY_cw,cm.setcon3,nil,nil,cm.operation2,true) cm[0] = 6
e3:SetCountLimit(1,m+EFFECT_COUNT_CODE_CHAIN) cm[1] = 0
if cm.gl==nil then
cm.gl=true
cm[0]=0
cm[1]=0
end end
end end
function cm.ffilter(c,c2) function cm.ffilter(c, c2)
return c:CheckEquipTarget(c2) return c:CheckEquipTarget(c2) and c2:IsFaceup()
end end
function cm.filter(c,e,g)
local g2=g:Filter(cm.ffilter, nil,c) function cm.filter(c, e, g)
return c:IsCanBeEffectTarget(e) and g2 and #g2>0 local g2 = g:Filter(cm.ffilter, nil, c)
return c:IsCanBeEffectTarget(e) and #g2 > 0
end end
function cm.filter2(c) function cm.filter2(c)
return c:IsType(TYPE_EQUIP) and not c:IsForbidden() and aux.IsCodeListed(c, yr) return c:IsType(TYPE_EQUIP) and not c:IsForbidden() and aux.IsCodeListed(c, yr)
end end
function cm.filter3(c,g)
function cm.filter3(c, g)
return g:IsContains(c) return g:IsContains(c)
end end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_HAND,0,nil) function cm.setcon(e, tp, eg, ep, ev, re, r, rp)
local g2=Duel.GetMatchingGroup(cm.filter,tp,QY_gs,QY_gs,nil,e,g) local g = Duel.GetMatchingGroup(cm.filter2, tp, LOCATION_HAND, 0, nil)
local g2 = Duel.GetMatchingGroup(cm.filter, tp, QY_gs, QY_gs, nil, e, g)
-- local g3=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,nil)
-- local g4=Duel.GetMatchingGroup(cm.filter,tp,QY_gs,QY_gs,nil,e,g3)
return Duel.GetCurrentChain() ~= 0 and #g2 > 0 -- and #g4<=0
end
function cm.setcon2(e, tp, eg, ep, ev, re, r, rp)
-- local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_HAND,0,nil)
-- local g2=Duel.GetMatchingGroup(cm.filter,tp,QY_gs,QY_gs,nil,e,g)
-- local g3=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,nil) -- local g3=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,nil)
-- local g4=Duel.GetMatchingGroup(cm.filter,tp,QY_gs,QY_gs,nil,e,g3) -- local g4=Duel.GetMatchingGroup(cm.filter,tp,QY_gs,QY_gs,nil,e,g3)
return g2 and #g2>0 or (Duel.GetTurnPlayer()==e:GetHandlerPlayer() and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)) return Duel.GetCurrentChain() == 0 --#g4>0 and #g2<0
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end function cm.cost(e, tp, eg, ep, ev, re, r, rp, chk)
Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD) if chk == 0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(), REASON_DISCARD)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() function cm.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
local oc=LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK local c = e:GetHandler()
if Duel.GetTurnPlayer()~=e:GetHandlerPlayer() then local oc = LOCATION_HAND + LOCATION_GRAVE + LOCATION_DECK
oc=QY_sk if e:GetLabel() == m then
oc = QY_sk
end end
local g=Duel.GetMatchingGroup(cm.filter2,tp,oc,0,nil) local g = Duel.GetMatchingGroup(cm.filter2, tp, oc, 0, nil)
local g2=Duel.GetMatchingGroup(cm.filter,tp,QY_gs,QY_gs,nil,e,g) local g2 = Duel.GetMatchingGroup(cm.filter, tp, QY_gs, QY_gs, nil, e, g)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and g:IsContains(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and g:IsContains(chkc) end
if chk==0 then return g2 and #g2>0 end if chk == 0 then return #g2 > 0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_OPERATECARD)
Duel.SelectTarget(tp,cm.filter3,tp,QY_gs,QY_gs,1,1,nil,g2) Duel.SelectTarget(tp, cm.filter3, tp, QY_gs, QY_gs, 1, 1, nil, g2)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() function cm.operation(e, tp, eg, ep, ev, re, r, rp)
local tc=Duel.GetFirstTarget() local c = e:GetHandler()
local tc = Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e) then
local oc=LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK local oc = LOCATION_HAND + LOCATION_GRAVE + LOCATION_DECK
if Duel.GetTurnPlayer()~=e:GetHandlerPlayer() then if e:GetLabel() == m then
oc=QY_sk oc = QY_sk
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
local tcg=Duel.SelectMatchingCard(tp,cm.filter2,tp,oc,0,1,1,nil):GetFirst() local tcg = Duel.SelectMatchingCard(tp, Card.CheckEquipTarget, tp, oc, 0, 1, 1, nil, tc):GetFirst()
Duel.Equip(tp,tcg,tc,true) Duel.Equip(tp, tcg, tc, true)
end end
end end
function cm.filter5(c,e,tp)
return c:IsAbleToDeck() function cm.filter5(c, e, tp)
return c:IsType(TYPE_EQUIP) and c:IsAbleToDeck()
end end
function cm.filter6(c,e,tp)
return c:IsType(TYPE_EQUIP) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) function cm.filter6(c, e, tp)
return c:IsType(TYPE_EQUIP) and c:IsCanBeSpecialSummoned(e, 0, tp, true, false) and
Duel.IsPlayerCanSpecialSummonMonster(tp, c:GetCode(), 0, TYPE_NORMAL + TYPE_MONSTER)
end end
function cm.setcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp, m)<=0 function cm.setcon3(e, tp, eg, ep, ev, re, r, rp)
return Duel.GetFlagEffect(tp, m) <= 0
end end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
function cm.sumlimit(e, c, sump, sumtype, sumpos, targetp)
return c:IsType(TYPE_NORMAL) return c:IsType(TYPE_NORMAL)
end end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() function cm.operation2(e, tp, eg, ep, ev, re, r, rp)
cm[tp]=cm[tp]+1 local c = e:GetHandler()
local num=cm[tp] cm[tp] = cm[tp] + 1
local g2 = Duel.GetMatchingGroup( cm.filter6, tp, LOCATION_GRAVE, 0, nil ,e,tp) local num = cm[tp]
local kx,zzx,sxx,zzjc,sxjc,zzl=it.sxbl() local g1 = Duel.GetMatchingGroup(cm.filter5, tp, LOCATION_GRAVE, 0, nil):GetFirst()
if Duel.Recover(tp,200,REASON_EFFECT)>0 then local g2 = Duel.GetMatchingGroup(cm.filter6, tp, LOCATION_GRAVE, 0, g1, e, tp)
if num>=6 and #g2>0 and zzx>0 and xg.ky(tp,m,1) then local kx, zzx, sxx, zzjc, sxjc, zzl = it.sxbl()
if num >= 6 and g1 ~= nil and #g2 > 0 and zzx > 0 and xg.ky(tp, m, 1) then
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
local g = Duel.SelectMatchingCard(tp, nil, tp, LOCATION_GRAVE, 0, 1, 3, nil) local g = Duel.SelectMatchingCard(tp, cm.filter5, tp, LOCATION_GRAVE, 0, 1, 1, nil)
Duel.SendtoDeck(g, nil, 2, REASON_EFFECT) Duel.SendtoDeck(g, nil, 2, REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local tc = Duel.SelectMatchingCard(tp, cm.filter6, tp, LOCATION_GRAVE, 0, 1, 1, nil ,e,tp):GetFirst() local tc = Duel.SelectMatchingCard(tp, cm.filter6, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp):GetFirst()
local zz,sx,lv=it.sxblx(tp,kx,zzx,sxx,zzl) local zz, sx, lv = it.sxblx(tp, kx, zzx, sxx, zzl)
if tc and Duel.IsPlayerCanSpecialSummonMonster(tp,tc:GetCode(),0,TYPE_NORMAL+TYPE_MONSTER,0,0,lv,zz,sx) then if tc and Duel.IsPlayerCanSpecialSummonMonster(tp, tc:GetCode(), 0, TYPE_NORMAL + TYPE_MONSTER, 0, 0, lv, zz, sx) then
tc:AddMonsterAttribute(TYPE_NORMAL+TYPE_MONSTER,sx,zz,lv,0,0) tc:AddMonsterAttribute(TYPE_NORMAL + TYPE_MONSTER, sx, zz, lv, 0, 0)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(tc, 0, tp, tp, true, false, POS_FACEUP_DEFENSE)
local e3=Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_REDIRECT) e3:SetReset(RESET_EVENT + RESETS_REDIRECT)
e3:SetValue(LOCATION_REMOVED) e3:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e3,true) tc:RegisterEffect(e3, true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(cm.atkval)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
local e4=Effect.CreateEffect(c) local e4 = Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION) e4:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0) e4:SetTargetRange(1, 0)
e4:SetTarget(cm.sumlimit) e4:SetTarget(cm.sumlimit)
Duel.RegisterEffect(e4,true) Duel.RegisterEffect(e4, true)
end end
end end
if num>=10 and xg.ky(tp,m,2) then if num >= 10 and xg.ky(tp, m, 2) then
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c, nil, 2, REASON_EFFECT) Duel.SendtoDeck(c, nil, 2, REASON_EFFECT)
end end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
local g = Duel.SelectMatchingCard(tp, cm.filter5, tp, LOCATION_GRAVE+QY_cs+QY_cw, LOCATION_GRAVE+QY_cs+QY_cw, 1, num, nil) local g = Duel.SelectMatchingCard(tp, cm.filter5, tp, LOCATION_GRAVE + QY_cs + QY_cw, LOCATION_GRAVE + QY_cs +
QY_cw, 1, num, nil)
Duel.SendtoDeck(g, nil, 2, REASON_EFFECT) Duel.SendtoDeck(g, nil, 2, REASON_EFFECT)
Duel.RegisterFlagEffect(tp, m, SD_js, 0, 1) Duel.RegisterFlagEffect(tp, m, SD_js, 0, 1)
end end
end end
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,e:GetHandlerPlayer(),LOCATION_GRAVE+LOCATION_REMOVED,0,nil)*500
end
function cm.atkfilter(c)
return aux.IsCodeListed(c, yr) and c:IsType(TYPE_EQUIP)
end
\ No newline at end of file
--在水一方 --在水一方
local cm, m, ofs = GetID() local cm, m, ofs = GetID()
local yr = 13020010 local yr = 13020010
xpcall(function() dofile("expansions/script/c16670000.lua") end,function() dofile("script/c16670000.lua") end)--引用库 xpcall(function() dofile("expansions/script/c16670000.lua") end, function() dofile("script/c16670000.lua") end) --引用库
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c, yr) aux.AddCodeList(c, yr)
--cm.AddEquipSpellEffect(c,true,true,nil,nil) aux.AddEquipSpellEffect(c, true, true, nil, nil)
aux.AddEquipSpellEffect(c,true,true,Card.IsFaceup,nil) local e1 = xg.epp2(c, m, 4, EVENT_EQUIP, EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY, QY_mx, nil, nil, cm.target,
local e1=xg.epp2(c,m,4,EVENT_EQUIP,EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY,QY_mx,nil,nil,cm.target,cm.operation,true) cm.operation, true)
e1:SetCountLimit(1,m) e1:SetCountLimit(1, m)
local e2=Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CANNOT_DISABLE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_REMOVED) e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,m+1) e3:SetCountLimit(1, m + 1)
e3:SetCondition(cm.descon) e3:SetCondition(cm.descon)
e3:SetCost(cm.cost) e3:SetCost(cm.cost)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
e3:SetOperation(cm.desop) e3:SetOperation(cm.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
--[[function cm.AddEquipSpellEffect(c,is_self,is_opponent,filter,eqlimit,pause,skip_target)
local value=(type(eqlimit)=="function") and eqlimit or 1 function aux.AddEquipSpellEffect(c, is_self, is_opponent, filter, eqlimit, pause, skip_target)
if pause==nil then pause=false end local value = (type(eqlimit) == "function") and eqlimit or 1
if skip_target==nil then skip_target=false end if pause == nil then pause = false end
if skip_target == nil then skip_target = false end
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_CONTINUOUS_TARGET)
if not skip_target then if not skip_target then
e1:SetTarget(cm.EquipSpellTarget(is_self,is_opponent,filter,eqlimit)) e1:SetTarget(cm.EquipSpellTarget(is_self, is_opponent, filter, eqlimit))
end end
e1:SetOperation(cm.EquipSpellOperation(eqlimit)) e1:SetOperation(cm.EquipSpellOperation(eqlimit))
if not pause then if not pause then
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Equip limit --Equip limit
local e2=Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
...@@ -51,97 +48,105 @@ end ...@@ -51,97 +48,105 @@ end
c:RegisterEffect(e2) c:RegisterEffect(e2)
return e1 return e1
end end
function cm.EquipSpellTarget(is_self,is_opponent,filter,eqlimit)
local loc1=is_self and LOCATION_MZONE or 0 function cm.EquipSpellTarget(is_self, is_opponent, filter, eqlimit)
local loc2=is_opponent and LOCATION_MZONE or 0 local loc1 = is_self and LOCATION_MZONE or 0
return function(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local loc2 = is_opponent and LOCATION_MZONE or 0
if chkc then return chkc:IsLocation(LOCATION_MZONE) and (not eqlimit or eqlimit(e,chkc)) end return function(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
if chk==0 then return Duel.IsExistingTarget(filter,tp,loc1,loc2,1,nil) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and (not eqlimit or eqlimit(e, chkc)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) if chk == 0 then return Duel.IsExistingTarget(filter, tp, loc1, loc2, 1, nil) end
Duel.SelectTarget(tp,filter,tp,loc1,loc2,1,1,nil) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SelectTarget(tp, filter, tp, loc1, loc2, 1, 1, nil)
Duel.SetOperationInfo(0, CATEGORY_EQUIP, e:GetHandler(), 1, 0, 0)
end end
end end
function cm.EquipSpellOperation(eqlimit) function cm.EquipSpellOperation(eqlimit)
return function (e,tp,eg,ep,ev,re,r,rp) return function(e, tp, eg, ep, ev, re, r, rp)
local c=e:GetHandler() local c = e:GetHandler()
local tc=Duel.GetFirstTarget() local tc = Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and (not eqlimit or eqlimit(e,tc)) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and (not eqlimit or eqlimit(e, tc)) then
Duel.Equip(tp,c,tc) Duel.Equip(tp, c, tc)
end end
end end
end]]-- end
function cm.filter(c) function cm.filter(c)
return c:IsCode(yr) and c:IsAbleToHand() return c:IsCode(yr) and c:IsAbleToHand()
end end
function cm.filter1(c,ec,c2)
return c:GetEquipTarget()==ec and c==c2 function cm.filter1(c, ec, c2)
return c:GetEquipTarget() == ec and c == c2
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() function cm.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
local tc=e:GetHandler():GetEquipTarget() local c = e:GetHandler()
--local dg=eg:Filter(cm.filter1,nil,tc,c) local tc = e:GetHandler():GetEquipTarget()
local g = Duel.GetMatchingGroup(cm.filter, tp, LOCATION_DECK+QY_md, 0, nil) local dg = eg:Filter(cm.filter1, nil, tc, c)
if chk==0 then return tc and tc:IsCanChangePosition() and #g>0 end local g = Duel.GetMatchingGroup(cm.filter, tp, LOCATION_DECK + QY_md, 0, nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,tc,1,0,0) if chk == 0 then return #dg > 0 and tc and tc:IsCanChangePosition() and #g > 0 end
Duel.SetOperationInfo(0, CATEGORY_POSITION, tc, 1, 0, 0)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() function cm.operation(e, tp, eg, ep, ev, re, r, rp)
local tc=c:GetEquipTarget() local c = e:GetHandler()
local tc = c:GetEquipTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if tc and Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)~=0 then if tc and Duel.ChangePosition(tc, POS_FACEUP_DEFENSE, POS_FACEUP_DEFENSE, POS_FACEUP_ATTACK, POS_FACEUP_ATTACK) ~= 0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
local g = Duel.SelectMatchingCard(tp, cm.filter, tp, LOCATION_DECK+QY_md, 0, 1, 1, nil) local g = Duel.SelectMatchingCard(tp, cm.filter, tp, LOCATION_DECK + QY_md, 0, 1, 1, nil)
if g:GetCount() > 0 then if g:GetCount() > 0 then
if Duel.SendtoHand(g, nil, REASON_EFFECT)~=0 then if Duel.SendtoHand(g, nil, REASON_EFFECT) ~= 0 then
Duel.ConfirmCards(1 - tp, g) Duel.ConfirmCards(1 - tp, g)
if xg.ky(tp,m,1) then if xg.ky(tp, m, 1) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) Duel.ChangePosition(tc, POS_FACEUP_DEFENSE, POS_FACEUP_DEFENSE, POS_FACEUP_ATTACK, POS_FACEUP_ATTACK)
end end
end end
end end
end end
end end
function cm.cfilter(c,tp,rp) function cm.cfilter(c, tp, rp)
return c:IsPreviousControler(tp) return c:IsPreviousControler(tp)
and rp==1-tp and c:IsPreviousLocation(LOCATION_MZONE) and rp == 1 - tp and c:IsPreviousLocation(LOCATION_MZONE)
end end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp,rp) and not eg:IsContains(e:GetHandler()) function cm.descon(e, tp, eg, ep, ev, re, r, rp)
return eg:IsExists(cm.cfilter, 1, nil, tp, rp) and not eg:IsContains(e:GetHandler())
end end
function cm.filter6(c,e,tp,id,g)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and #g:Filter(cm.filter4, nil,c)~=0 function cm.filter6(c, e, tp, id, g)
return c:IsCanBeSpecialSummoned(e, 0, tp, true, false) and #g:Filter(cm.filter4, nil, c) ~= 0
end end
function cm.filter5(c,e,tp)
return c:IsType(TYPE_EQUIP) or c:IsType(TYPE_UNION) function cm.filter5(c, e, tp)
return c:IsType(TYPE_EQUIP)
end end
function cm.filter4(c,c2)
return c:CheckEquipTarget(c2) and not c:IsCode(m) function cm.filter4(c, c2)
return c2:CheckEquipTarget(c) and not c:IsCode(m)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() function cm.cost(e, tp, eg, ep, ev, re, r, rp, chk)
if chk==0 then return c:IsLocation(QY_cw) end local c = e:GetHandler()
Duel.SendtoGrave(c,REASON_EFFECT+REASON_RETURN) if chk == 0 then return c:IsLocation(QY_cw) end
Duel.SendtoGrave(c, REASON_EFFECT + REASON_RETURN)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g2 = Duel.GetMatchingGroup( cm.filter5, tp, LOCATION_GRAVE+QY_cw, 0, nil,e,tp) function cm.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
local g1 = Duel.GetMatchingGroup( cm.filter6, tp, LOCATION_GRAVE+QY_cw, 0, nil,e,tp,m,g2) local g2 = Duel.GetMatchingGroup(cm.filter5, tp, LOCATION_GRAVE + QY_cw, 0, nil, e, tp)
local g1 = Duel.GetMatchingGroup(cm.filter6, tp, LOCATION_GRAVE + QY_cw, 0, nil, e, tp, m, g2)
-- local g3 = g2:Filter(aux.TRUE, nil) -- local g3 = g2:Filter(aux.TRUE, nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g1>0 end if chk == 0 then return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and #g1 > 0 end
local c=e:GetHandler() local c = e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, 0, 0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g2 = Duel.GetMatchingGroup( cm.filter5, tp, LOCATION_GRAVE+QY_cw, 0, nil,e,tp)
local g1 = Duel.SelectMatchingCard(tp, cm.filter6, tp, LOCATION_GRAVE+QY_cw, 0, 1, 1, nil,e,tp,m,g2):GetFirst()
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
g2=g2:FilterSelect(tp,cm.filter4,1,1,nil,g1):GetFirst()
Duel.Equip(tp,g2,g1,true)
end end
function cm.desop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
local g2 = Duel.GetMatchingGroup(cm.filter5, tp, LOCATION_GRAVE + QY_cw, 0, nil, e, tp)
local g1 = Duel.SelectMatchingCard(tp, cm.filter6, tp, LOCATION_GRAVE + QY_cw, 0, 1, 1, nil, e, tp, m, g2):GetFirst()
Duel.SpecialSummon(g1, 0, tp, tp, false, false, POS_FACEUP)
g2 = g2:Filter(cm.filter4, nil, g1)
Duel.Equip(tp, g2, g1, true)
end
This diff is collapsed.
This diff is collapsed.
...@@ -34,7 +34,7 @@ function xg.epp(c, id, su, ...) --XG.epp(c,id,su,...) 不推荐使用 ...@@ -34,7 +34,7 @@ function xg.epp(c, id, su, ...) --XG.epp(c,id,su,...) 不推荐使用
end end
for _, o in pairs(l2) do for _, o in pairs(l2) do
if su[o] == nil or su[o] == "" then if su[o] == nil or su[o] == "" then
su[o] = cm.TRUE su[o] = aux.TRUE
end end
end end
else else
...@@ -53,7 +53,7 @@ function xg.epp(c, id, su, ...) --XG.epp(c,id,su,...) 不推荐使用 ...@@ -53,7 +53,7 @@ function xg.epp(c, id, su, ...) --XG.epp(c,id,su,...) 不推荐使用
end end
end end
end end
e1:SetDescription(cm.Stringid(id, su["Description"])) e1:SetDescription(aux.Stringid(id, su["Description"]))
e1:SetCategory(su["Category"]) e1:SetCategory(su["Category"])
e1:SetProperty(su["Property"]) e1:SetProperty(su["Property"])
e1:SetType(su["Type"]) e1:SetType(su["Type"])
...@@ -129,7 +129,7 @@ function xg.epp2(c, id, cf, co, ta, qy, h1, h2, h3, h4, zc) --XG.epp2(c,m,2,nil, ...@@ -129,7 +129,7 @@ function xg.epp2(c, id, cf, co, ta, qy, h1, h2, h3, h4, zc) --XG.epp2(c,m,2,nil,
end end
function xg.ky(tp, id, zh) --简易选择是否 function xg.ky(tp, id, zh) --简易选择是否
return Duel.SelectYesNo(tp, cm.Stringid(id, zh)) return Duel.SelectYesNo(tp, aux.Stringid(id, zh))
end end
--失落之魂 --失落之魂
...@@ -192,7 +192,7 @@ hj = hj or {} ...@@ -192,7 +192,7 @@ hj = hj or {}
cm = it cm = it
function cm.GetEffectValue(e, ...) --检测e是否函数,是的场合执行函数内容 function cm.GetEffectValue(e, ...) --检测e是否函数,是的场合执行函数内容
local v = e:GetValue() local v = e:GetValue()
if cm.GetValueType(v) == "function" then if aux.GetValueType(v) == "function" then
return v(e, ...) return v(e, ...)
else else
return v return v
......
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