Commit 0ee8ca03 authored by songtongtong's avatar songtongtong

bug fix

parent f003b6cc
Pipeline #21715 passed with stages
in 24 minutes and 39 seconds
...@@ -109,6 +109,7 @@ function cm.cfilter(c,e,tp) ...@@ -109,6 +109,7 @@ function cm.cfilter(c,e,tp)
return c:IsSummonPlayer(tp) and c:IsSetCard(0xccb) and c:IsType(TYPE_MONSTER) and c~=e:GetHandler() return c:IsSummonPlayer(tp) and c:IsSetCard(0xccb) and c:IsType(TYPE_MONSTER) and c~=e:GetHandler()
end end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp) function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
return eg:IsExists(cm.cfilter,1,nil,e,tp) and g:GetCount()>0 and c:GetFlagEffect(m*10)==0 return eg:IsExists(cm.cfilter,1,nil,e,tp) and g:GetCount()>0 and c:GetFlagEffect(m*10)==0
end end
......
...@@ -17,7 +17,7 @@ function c64837008.initial_effect(c) ...@@ -17,7 +17,7 @@ function c64837008.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1,64837008)
e1:SetCondition(c64837008.eqcon) e1:SetCondition(c64837008.eqcon)
e1:SetCost(c64837008.eqcost) e1:SetCost(c64837008.eqcost)
e1:SetTarget(c64837008.eqtg) e1:SetTarget(c64837008.eqtg)
...@@ -77,7 +77,7 @@ function c64837008.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -77,7 +77,7 @@ function c64837008.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c64837008.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) function c64837008.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_EXTRA,nil)>=2 end and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_EXTRA,nil)>=3 end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end end
function c64837008.eqlimit(e,c) function c64837008.eqlimit(e,c)
...@@ -108,13 +108,14 @@ function c64837008.equip_monster(c,tp,tc) ...@@ -108,13 +108,14 @@ function c64837008.equip_monster(c,tp,tc)
end end
function c64837008.eqop(e,tp,eg,ep,ev,re,r,rp) function c64837008.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ag=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_EXTRA,nil) local ag=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_EXTRA,nil)
if ag:GetCount()<2 then return end if ag:GetCount()<3 then return end
local g=ag:RandomSelect(1-tp,2) local g=ag:RandomSelect(1-tp,3)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(tp,g)
if g:IsExists(Card.IsAbleToChangeControler,1,nil) then if g:IsExists(Card.IsAbleToChangeControler,1,nil) then
local sg=g:Filter(Card.IsAbleToChangeControler,1,nil) local sg=g:Filter(Card.IsAbleToChangeControler,1,nil)
local tc=sg:Select(1-tp,1,1,nil):GetFirst() local tc=sg:Select(tp,1,1,nil):GetFirst()
c64837008.equip_monster(c,tp,tc) c64837008.equip_monster(c,tp,tc)
end end
end end
\ No newline at end of file
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