Commit 92f503bf authored by POLYMER's avatar POLYMER

fix

parent 107f8b37
...@@ -24,6 +24,7 @@ function cm.initial_effect(c) ...@@ -24,6 +24,7 @@ function cm.initial_effect(c)
local _CRemoveOverlayCard=Card.RemoveOverlayCard local _CRemoveOverlayCard=Card.RemoveOverlayCard
local _FilterSelect=Group.FilterSelect local _FilterSelect=Group.FilterSelect
local _Select=Group.Select local _Select=Group.Select
pnfl_CancelableSelect=Group.CancelableSelect
local _CancelableSelect=Group.CancelableSelect local _CancelableSelect=Group.CancelableSelect
local _SelectUnselect=Group.SelectUnselect local _SelectUnselect=Group.SelectUnselect
local function Local_RandomSelect(g,tp,ct) local function Local_RandomSelect(g,tp,ct)
...@@ -174,7 +175,7 @@ function cm.initial_effect(c) ...@@ -174,7 +175,7 @@ function cm.initial_effect(c)
local ng=g:Clone() local ng=g:Clone()
if aux.GetValueType(nc)=="Card" then ng:RemoveCard(nc) end if aux.GetValueType(nc)=="Card" then ng:RemoveCard(nc) end
if aux.GetValueType(nc)=="Group" then ng:Sub(nc) end if aux.GetValueType(nc)=="Group" then ng:Sub(nc) end
if not Duel.SelectYesNo(sp,aux.Stringid(m,2)) then return Group.CreateGroup() end if not Duel.SelectYesNo(sp,aux.Stringid(m,2)) then return nil end
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
--local ct=Duel.GetFlagEffectLabel(sp,m) --local ct=Duel.GetFlagEffectLabel(sp,m)
--Duel.SetFlagEffectLabel(sp,m,ct+1) --Duel.SetFlagEffectLabel(sp,m,ct+1)
...@@ -235,7 +236,7 @@ function cm.roll(min,max) ...@@ -235,7 +236,7 @@ function cm.roll(min,max)
return math.floor(cm.r*min)+1 return math.floor(cm.r*min)+1
else else
max=max-min+1 max=max-min+1
return math.floor(cm.r*max+min) return math.floor(cm.r*max)+min
end end
end end
return cm.r return cm.r
......
...@@ -26,6 +26,7 @@ function cm.initial_effect(c) ...@@ -26,6 +26,7 @@ function cm.initial_effect(c)
if not cm.global_check then if not cm.global_check then
cm.global_check=true cm.global_check=true
cm.activate_sequence={} cm.activate_sequence={}
pnfl_CancelableSelect=pnfl_CancelableSelect or Group.CancelableSelect
local _GetActivateLocation=Effect.GetActivateLocation local _GetActivateLocation=Effect.GetActivateLocation
local _GetActivateSequence=Effect.GetActivateSequence local _GetActivateSequence=Effect.GetActivateSequence
local _NegateActivation=Duel.NegateActivation local _NegateActivation=Duel.NegateActivation
...@@ -184,7 +185,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -184,7 +185,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local tg=g:Filter(function(c) return c:IsFacedown() and c:IsControler(1-tp) end,nil) local tg=g:Filter(function(c) return c:IsFacedown() and c:IsControler(1-tp) end,nil)
Duel.ConfirmCards(tp,tg) Duel.ConfirmCards(tp,tg)
Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(11451031,4)) Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(11451031,4))
local sg=g:CancelableSelect(tp,1,1,nil) local sg=pnfl_CancelableSelect(g,tp,1,1,nil)
if not sg then if not sg then
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end
......
...@@ -20,6 +20,7 @@ function cm.initial_effect(c) ...@@ -20,6 +20,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not cm.global_check then if not cm.global_check then
cm.global_check=true cm.global_check=true
pnfl_CancelableSelect=pnfl_CancelableSelect or Group.CancelableSelect
local _MoveToField=Duel.MoveToField local _MoveToField=Duel.MoveToField
local _ReturnToField=Duel.ReturnToField local _ReturnToField=Duel.ReturnToField
local _IsCanOverlay=Card.IsCanOverlay local _IsCanOverlay=Card.IsCanOverlay
...@@ -212,7 +213,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -212,7 +213,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local tg=g:Filter(function(c) return c:IsFacedown() and c:IsControler(1-tp) end,nil) local tg=g:Filter(function(c) return c:IsFacedown() and c:IsControler(1-tp) end,nil)
Duel.ConfirmCards(tp,tg) Duel.ConfirmCards(tp,tg)
Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(11451031,4)) Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(11451031,4))
local sg=g:CancelableSelect(tp,1,1,nil) local sg=pnfl_CancelableSelect(g,tp,1,1,nil)
if not sg then if not sg then
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end
......
...@@ -21,6 +21,7 @@ function cm.initial_effect(c) ...@@ -21,6 +21,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not cm.global_check then if not cm.global_check then
cm.global_check=true cm.global_check=true
pnfl_CancelableSelect=pnfl_CancelableSelect or Group.CancelableSelect
--replace --replace
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2)) e3:SetDescription(aux.Stringid(m,2))
...@@ -210,7 +211,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -210,7 +211,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local tg=g:Filter(function(c) return c:IsFacedown() and c:IsControler(1-tp) end,nil) local tg=g:Filter(function(c) return c:IsFacedown() and c:IsControler(1-tp) end,nil)
Duel.ConfirmCards(tp,tg) Duel.ConfirmCards(tp,tg)
Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(11451031,4)) Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(11451031,4))
local sg=g:CancelableSelect(tp,1,1,nil) local sg=pnfl_CancelableSelect(g,tp,1,1,nil)
if not sg then if not sg then
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end
......
...@@ -11,6 +11,7 @@ function cm.initial_effect(c) ...@@ -11,6 +11,7 @@ function cm.initial_effect(c)
e1:SetCondition(function(e) return not cm.spcost(e,nil,e:GetHandlerPlayer()) end) e1:SetCondition(function(e) return not cm.spcost(e,nil,e:GetHandlerPlayer()) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not cm.global_check then if not cm.global_check then
pnfl_CancelableSelect=pnfl_CancelableSelect or Group.CancelableSelect
--replace --replace
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2)) e3:SetDescription(aux.Stringid(m,2))
...@@ -179,7 +180,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -179,7 +180,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local tg=g:Filter(function(c) return c:IsFacedown() and c:IsControler(1-tp) end,nil) local tg=g:Filter(function(c) return c:IsFacedown() and c:IsControler(1-tp) end,nil)
Duel.ConfirmCards(tp,tg) Duel.ConfirmCards(tp,tg)
Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(11451031,4)) Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(11451031,4))
local sg=g:CancelableSelect(tp,1,1,nil) local sg=pnfl_CancelableSelect(g,tp,1,1,nil)
if not sg then if not sg then
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end
......
...@@ -134,7 +134,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp) ...@@ -134,7 +134,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
e:SetCost(cost) e:SetCost(cost)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,Card.IsSSetable,tp,LOCATION_HAND,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,Card.IsSSetable,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
Duel.SSet(tp,tc,tp,false) if tc then Duel.SSet(tp,tc,tp,false) end
end end
if not tc:IsHasEffect(m) then if not tc:IsHasEffect(m) then
cost2=function(e,tp,eg,ep,ev,re,r,rp,chk) cost2=function(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -145,7 +145,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp) ...@@ -145,7 +145,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=(g+c):Select(tp,1,1,nil):GetFirst() local tc=(g+c):Select(tp,1,1,nil):GetFirst()
Duel.SSet(tp,tc,tp,true) if tc then Duel.SSet(tp,tc,tp,true) end
else else
Duel.SSet(tp,c,tp,true) Duel.SSet(tp,c,tp,true)
end end
...@@ -234,8 +234,9 @@ function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -234,8 +234,9 @@ function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
if c:IsOnField() then if c:IsOnField() then
local ng=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) local ng=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local ag=ng:GetMinGroup(cm.distance2,c,tp):Filter(Card.IsCanBeEffectTarget,nil,e) local ag=ng:GetMinGroup(cm.distance2,c,tp)
if #ag>0 then Duel.SetTargetCard(ag) end if ag and #ag>0 then ag=ag:Filter(Card.IsCanBeEffectTarget,nil,e) end
if ag and #ag>0 then Duel.SetTargetCard(ag) end
else else
local ng=Duel.GetMatchingGroup(cm.gsfilter,tp,LOCATION_GRAVE,0,nil,c) local ng=Duel.GetMatchingGroup(cm.gsfilter,tp,LOCATION_GRAVE,0,nil,c)
local ag=ng:Filter(Card.IsCanBeEffectTarget,nil,e) local ag=ng:Filter(Card.IsCanBeEffectTarget,nil,e)
......
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