Commit 9cfff4ce authored by wind2009's avatar wind2009

Fix

parent 17baf905
No preview for this file type
......@@ -38,19 +38,20 @@ end
function s.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not (c:IsRace(RACE_MACHINE) and c:GetTextAttack()>=0 and c:GetTextAttack()<=1500)
end
function s.spfilter(c,e,tp)
function s.spfilter(c,e,tp,cost)
return c:IsSetCard(0x2d2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not cost or not s.splimit(e,c))
and not Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsCode),tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,e:IsCostChecked()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,false)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -75,7 +75,7 @@ function s.eaop(e,tp,eg,ep,ev,re,r,rp)
end
function s.actcon(e)
local a=Duel.GetAttacker()
return a~=nil and a:IsSetCard(0x10af) and a:IsControler(e:GetHandlerPlayer())
return a~=nil and a:IsSetCard(0x10af) and a:IsControler(e:GetHandlerPlayer()) and a:IsRelateToBattle()
end
function s.thfilter(c)
return c:IsFaceupEx() and c:IsSetCard(0xaf)
......
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