Commit dd60c05b authored by nanahira's avatar nanahira

fixes

parent 2e02bcae
......@@ -13,7 +13,6 @@ function cm.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(aux.bfgcost)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.eqtg)
e4:SetOperation(cm.eqop)
c:RegisterEffect(e4)
......@@ -48,23 +47,23 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(sg,REASON_EFFECT)
end
function cm.eqfilter(c,ec)
return c:IsCode(m+1) and
return c:IsCode(m-1) and
c:CheckEquipTarget(ec)
end
function cm.eqfilter2(c)
function cm.eqfilter2(c,tp)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and
Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_DECK,0,1,nil,c)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c)
and Duel.IsExistingMatchingCard(cm.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp)
end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local h=Duel.SelectMatchingCard(tp,cm.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local h=Duel.SelectMatchingCard(tp,cm.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_DECK,0,1,1,nil,h:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
......
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