Commit 6b93fdfc authored by wind2009's avatar wind2009

Fix 原石の皇脈

parent 84acbc0b
...@@ -59,23 +59,29 @@ function s.smtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,23 +59,29 @@ function s.smtg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(s.smfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(s.smfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(s.smfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(s.smfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,nil,e,tp)
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
for tc in aux.Next(g) do local codes={}
if sg:FilterCount(Card.IsCode,nil,tc:GetCode())==0 then for c in aux.Next(g) do
sg:AddCard(tc) local code=c:GetCode()
if not sg:IsExists(Card.IsCode,1,nil,code) then
sg:AddCard(c)
table.insert(codes,code)
end end
end end
local flag=1 table.sort(codes)
local nt={} local afilter={codes[1],OPCODE_ISCODE}
for tc in aux.Next(sg) do if #codes>1 then
table.insert(nt,tc:GetCode()) --or ... or c:IsCode(codes[i])
table.insert(nt,OPCODE_ISCODE) for i=2,#codes do
if flag>1 then table.insert(nt,OPCODE_OR) end table.insert(afilter,codes[i])
flag=flag+1 table.insert(afilter,OPCODE_ISCODE)
table.insert(afilter,OPCODE_OR)
end
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local code=Duel.AnnounceCard(tp,table.unpack(nt)) local code=Duel.AnnounceCard(tp,table.unpack(afilter))
getmetatable(e:GetHandler()).announce_filter={TYPE_MONSTER,OPCODE_ISTYPE,TYPE_NORMAL,OPCODE_ISTYPE,5405694,OPCODE_ISCODE,OPCODE_OR,OPCODE_AND} getmetatable(e:GetHandler()).announce_filter={TYPE_MONSTER,OPCODE_ISTYPE,TYPE_NORMAL,OPCODE_ISTYPE,5405694,OPCODE_ISCODE,OPCODE_OR,OPCODE_AND}
Duel.SetTargetParam(code) Duel.SetTargetParam(code)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end end
function s.smop(e,tp,eg,ep,ev,re,r,rp) function s.smop(e,tp,eg,ep,ev,re,r,rp)
......
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