Commit 2da67847 authored by VanillaSalt's avatar VanillaSalt

fix

parent ebaf8503
...@@ -25,15 +25,15 @@ end ...@@ -25,15 +25,15 @@ end
function c30757127.atkcon(e,tp,eg,ep,ev,re,r,rp) function c30757127.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c30757127.cfilter(c) function c30757127.cfilter(c,tp)
return c:IsDiscardable() and Duel.IsExistingMatchingCard(c30757127.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c) return c:IsDiscardable() and Duel.IsExistingMatchingCard(c30757127.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c)
end end
function c30757127.tgfilter(c) function c30757127.tgfilter(c)
return c:IsSetCard(0xc008) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() return c:IsSetCard(0xc008) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end end
function c30757127.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c30757127.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30757127.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c30757127.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.DiscardHand(tp,c30757127.cfilter,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,c30757127.cfilter,1,1,REASON_COST+REASON_DISCARD,nil,tp)
end end
function c30757127.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c30757127.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -15,9 +15,8 @@ end ...@@ -15,9 +15,8 @@ end
function c51345461.filter(c,rc,tid) function c51345461.filter(c,rc,tid)
return c:IsReason(REASON_BATTLE) and c:GetReasonCard()==rc and c:GetTurnID()==tid and not c:IsForbidden() return c:IsReason(REASON_BATTLE) and c:GetReasonCard()==rc and c:GetTurnID()==tid and not c:IsForbidden()
end end
function c51345461.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c51345461.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 true end
and Duel.IsExistingMatchingCard(c51345461.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e:GetHandler(),Duel.GetTurnCount()) end
local g=Duel.GetMatchingGroup(c51345461.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e:GetHandler(),Duel.GetTurnCount()) local g=Duel.GetMatchingGroup(c51345461.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e:GetHandler(),Duel.GetTurnCount())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,g:GetCount(),0,0)
end end
...@@ -26,13 +25,10 @@ function c51345461.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,13 +25,10 @@ function c51345461.eqop(e,tp,eg,ep,ev,re,r,rp)
if ft<=0 then return end if ft<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local gc=Duel.GetMatchingGroup(c51345461.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e:GetHandler(),Duel.GetTurnCount()) local g=Duel.GetMatchingGroup(c51345461.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e:GetHandler(),Duel.GetTurnCount())
if gc:GetCount()==0 then return end if g:GetCount()==0 then return end
if gc:GetCount()>ft then if g:GetCount()>ft then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local tc=g:GetFirst()
gc=gc:Select(tp,ft,ft,nil)
end
local tc=gc:GetFirst()
while tc do while tc do
Duel.Equip(tp,tc,c,false,true) Duel.Equip(tp,tc,c,false,true)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -49,7 +45,7 @@ function c51345461.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +45,7 @@ function c51345461.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(200) e2:SetValue(200)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
tc=gc:GetNext() tc=g:GetNext()
end end
Duel.EquipComplete() Duel.EquipComplete()
end end
......
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