Commit 0a5067c2 authored by VanillaSalt's avatar VanillaSalt

fix

parent 2d36ff2c
......@@ -31,9 +31,9 @@ function c29087919.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mg=Duel.GetMatchingGroup(c29087919.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
local mct=mg:GetClassCount(Card.GetCode)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct>mct then ct=mct end
local exg=Duel.GetMatchingGroup(c29087919.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg,ct)
local maxg,maxc=exg:GetMaxGroup(c29087919.xyzct)
if ct>mct then ct=mct end
if maxc and ct>maxc then ct=maxc end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and ct>1 and Duel.IsExistingMatchingCard(c29087919.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,mg,ct) end
......@@ -48,14 +48,15 @@ function c29087919.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
mg:Remove(Card.IsCode,nil,sg2:GetFirst():GetCode())
ct=ct-2
local minc=2
local exg3=Duel.GetMatchingGroup(c29087919.xyzfilter,tp,LOCATION_EXTRA,0,nil,sg1,minc)
local exg3=Duel.GetMatchingGroup(c29087919.spfilter,tp,LOCATION_EXTRA,0,nil,sg1,minc)
while mg:GetCount()>0 and ct>0 and (exg3:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(29087919,0))) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg3=mg:FilterSelect(tp,c29087919.mfilter1,1,1,nil,exg2)
sg1:Merge(sg3)
mg:Remove(Card.IsCode,nil,sg3:GetFirst():GetCode())
ct=ct-1
minc=minc+1
exg3=Duel.GetMatchingGroup(c29087919.xyzfilter,tp,LOCATION_EXTRA,0,nil,sg1,minc)
exg3=Duel.GetMatchingGroup(c29087919.spfilter,tp,LOCATION_EXTRA,0,nil,sg1,minc)
end
Duel.SetTargetCard(sg1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg1,sg1:GetCount(),0,0)
......
......@@ -33,20 +33,20 @@ function c82734805.valcheck(e,c)
e:GetLabelObject():SetLabel(ct)
end
function c82734805.con(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c82734805.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel()
local con3,con5,con8,con10=nil
if ct>=3 then
if ct>=3 then
con3=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,3,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,3,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,3,nil)
end
if ct>=5 then
con5=Duel.IsPlayerCanDiscardDeck(tp,3) and Duel.IsPlayerCanDiscardDeck(1-tp,3)
con5=Duel.IsPlayerCanDiscardDeck(tp,3) and Duel.IsPlayerCanDiscardDeck(1-tp,3)
end
if ct>=8 then
con8=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_REMOVED,0,1,nil)
con8=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_REMOVED,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_REMOVED,1,nil)
end
if ct>=10 then
......@@ -125,7 +125,7 @@ function c82734805.fcfilter6(c,g,ct,sub)
return ct>0 and (c:IsCode(23440231) or (sub and c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)))
end
function c82734805.fcfilter7(c,chkf)
return aux.FConditionCheckF(tc,chkf) and (c:IsSetCard(0xbb) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE))
return aux.FConditionCheckF(c,chkf) and (c:IsSetCard(0xbb) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE))
end
function c82734805.fscon(e,g,gc,chkf)
if g==nil then return true end
......@@ -160,9 +160,9 @@ function c82734805.fscon(e,g,gc,chkf)
tc=g:GetNext()
end
if chkf~=PLAYER_NONE then
return fs and b1+b2+bs>=2 and b3>=1
return fs and b1+b2+b3+bs>=3
else
return b1+b2+bs>=2 and b3>=1
return b1+b2+b3+bs>=3
end
end
function c82734805.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
......@@ -173,7 +173,7 @@ function c82734805.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
g1:AddCard(gc)
end
local mg=eg:Clone()
mg:RemoveCard(gc)
if gc then mg:RemoveCard(gc) end
local ok=false
if gc then
if gc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then
......
--トリック・ボックス
function c93983867.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DELAYED_QUICKEFFECT)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL+CATEGORY_SPECIAL_SUMMON)
......
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