Commit 9a6b24ee authored by POLYMER's avatar POLYMER

fix

parent c4c41831
......@@ -38,21 +38,21 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
function cm.dice(e,tp,eg,ep,d,re,r,rp)
--Debug.Message(CURSE_TRIGGER_DIVE)
if CURSE_TRIGGER_FIN>0 then return end
if CURSE_TRIGGER_DIVE>3 and CURSE_TRIGGER_FIN==0 then
CURSE_TRIGGER_FIN=1
Debug.Message("recursive event trigger detected.")
Debug.Message("[string \"./script/c11451984.lua\"]:47: attempt to index a nil value (local 'e')")
end
if CURSE_TRIGGER_FIN>0 then return end
local c=e:GetHandler()
if d==1 then
if CURSE_TRIGGER_FIN==0 and d==1 then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
local t={}
if #g>0 then t[#t+1]=2 end
t[#t+1]=3
if Duel.IsPlayerCanDraw(tp,1) then t[#t+1]=4 end
t[#t+1]=5
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then t[#t+1]=6 end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() and c:IsFaceup() then t[#t+1]=6 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,CURSE_TRIGGER_DIVE))
local d1=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.Hint(HINT_NUMBER,1-tp,d1)
......@@ -71,7 +71,7 @@ function cm.dice(e,tp,eg,ep,d,re,r,rp)
elseif d==3 then
local d1=Duel.TossDice(tp,1)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if not (d1==2 and #g==0) and not (d1==4 and not Duel.IsPlayerCanDraw(tp,1)) and not (d1==6 and not (c:IsRelateToEffect(e) and c:IsCanTurnSet())) and Duel.SelectYesNo(tp,aux.Stringid(m,4+CURSE_TRIGGER_DIVE)) then
if not (d1==2 and #g==0) and not (d1==4 and not Duel.IsPlayerCanDraw(tp,1)) and not (d1==6 and not (c:IsRelateToEffect(e) and c:IsCanTurnSet() and c:IsFaceup())) and CURSE_TRIGGER_FIN==0 and Duel.SelectYesNo(tp,aux.Stringid(m,4+CURSE_TRIGGER_DIVE)) then
CURSE_TRIGGER_DIVE=CURSE_TRIGGER_DIVE+1
cm.dice(e,tp,eg,ep,d1,re,r,rp)
--Duel.RaiseEvent(c,e:GetValue(),re,r,rp,ep,d1)
......
......@@ -135,7 +135,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.descon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetLabel()==1
return e:GetLabel()==0
end
function s.descon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabel()==1
......
......@@ -61,7 +61,7 @@ function s.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
c:RemoveOverlayCard(tp,ct,ct,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x5a7d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id)
return c:IsSetCard(0x5a7d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
or c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
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