Commit a74ea664 authored by POLYMER's avatar POLYMER

fix

parent ccd58a24
......@@ -36,7 +36,7 @@ end
-------------code check------------------
function VHisc_HDST.nck(c)
return c.VHisc_hdst or (VHisc_HDST.global_check and VHisc_HDST.codeck(VHisc_STCN,c))
return c.VHisc_hdst or (VHisc_HDST.global_check and VHisc_HDST.codeck(VHisc_STCN,c)) or c:GetFlagEffect(33201450)>0
end
......
......@@ -55,6 +55,7 @@ end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then Duel.SendtoGrave(c,REASON_RULE) return end
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(1-tp) and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,c,tc) then return end
--equip limit
......
......@@ -54,15 +54,19 @@ end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
local g=Duel.GetMatchingGroup(s.exfilter,tp,0,LOCATION_HAND,nil)
if ct and g:GetCount()>=ct then
if g:GetCount()>0 and ct then
local sg=g:RandomSelect(tp,ct)
Duel.ConfirmCards(tp,sg)
local tc=sg:GetFirst()
for tc in aux.Next(sg) do
-- if VHisc_HDST.nck(tc) then Duel.Destroy(tc,REASON_EFFECT) end
if not VHisc_HDST.codeck(VHisc_STCN,tc) then
local code=tc:GetOriginalCode()
sg:Remove(s.fgfilter,nil,code)
while tc do
if VHisc_HDST.nck(tc) then Duel.Destroy(tc,REASON_EFFECT) end
tc=sg:GetNext()
end
local tc2=sg:GetFirst()
while tc2 do
if not VHisc_HDST.codeck(VHisc_STCN,tc2) then
local code=tc2:GetOriginalCode()
VHisc_STCN[#VHisc_STCN+1]=code
local fg=Duel.GetMatchingGroup(s.fgfilter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA+LOCATION_REMOVED,nil,code)
for fc in aux.Next(fg) do
......@@ -71,11 +75,14 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
tc2=sg:GetNext()
end
Duel.Destroy(sg,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
end
end
function s.rmgfilter(c,ndg)
return ndg:IsExists(Card.IsCode,1,nil,c:GetOriginalCode())
end
function s.fgfilter(c,code)
return c:GetOriginalCode()==code
end
......
......@@ -30,21 +30,29 @@ function s.GetOriginalCode(card_object)
return nil -- 未找到
end
function s.LostLink(c)
if AD_LostLink_check then return end
AD_LostLink_check=true
--if AD_LostLink_check then return end
--AD_LostLink_check=true
local markers={0x1,0x2,0x4,0x8,0x20,0x40,0x80,0x100}
local _GetLink=Card.GetLink
local _IsLink=Card.IsLink
local _IsLinkAbove=Card.IsLinkAbove
local _IsLinkBelow=Card.IsLinkBelow
Card.GetLink=function(sc)
if c~=sc or not sc:IsLocation(LOCATION_MZONE) then return _GetLink(sc) end
return s.NumNumber(sc:GetLinkMarker(),markers)
end
Card.IsLink=function(sc,...)
if c~=sc or not sc:IsLocation(LOCATION_MZONE) then return _IsLink(sc,...) end
local t={...}
for _,v in ipairs(t) do if s.NumNumber(sc:GetLinkMarker(),markers)==v then return true end end
return false
end
Card.IsLinkAbove=function(sc,link)
if c~=sc or not sc:IsLocation(LOCATION_MZONE) then return _IsLinkAbove(sc,link) end
if s.NumNumber(sc:GetLinkMarker(),markers)>=link then return true else return false end
end
Card.IsLinkBelow=function(sc,link)
if c~=sc or not sc:IsLocation(LOCATION_MZONE) then return _IsLinkBelow(sc,link) end
if s.NumNumber(sc:GetLinkMarker(),markers)<=link then return true else return false end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment