Commit 5589f090 authored by POLYMER's avatar POLYMER

fix

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