Commit 2fe1fd25 authored by POLYMER's avatar POLYMER

fix

parent 48498313
......@@ -34,6 +34,7 @@ function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local tp=eg:GetFirst():GetOwner()
Duel.NegateSummon(eg)
if Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)~=0 then
Debug.Message("1")
local bg=Duel.GetOperatedGroup()
local tbg=bg:Filter(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
local t=#tbg
......@@ -43,15 +44,17 @@ function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
ncode[i]=nc:GetCode()
nc=tbg:GetNext()
end
local csg=Duel.GetMatchingGroup(cm.fil,tp,LOCATION_DECK,0,nil,t)
Debug.Message(t)
local csg=Duel.GetMatchingGroup(cm.fil,tp,LOCATION_DECK,0,nil,t,e,tp)
local spg=csg:RandomSelect(tp,math.min(#csg,t))
Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP)
if #csg<t then
Duel.Draw(tp,t-#csg,REASON_EFFECT)
end
end
end
function cm.fil(c,t)
function cm.fil(c,t,e,tp)
local ccode=0
for i=1,t do
if ncode[i]==c:GetCode() then
......
......@@ -5,6 +5,7 @@ function c64501208.initial_effect(c)
e1:SetDescription(aux.Stringid(64501208,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,64501208)
......
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