Commit fe66af0b authored by POLYMER's avatar POLYMER

fix

parent d1027c5f
...@@ -22,14 +22,6 @@ function logWarning(msg) ...@@ -22,14 +22,6 @@ function logWarning(msg)
end) end)
Debug.Message(err) Debug.Message(err)
end end
if not Group.ForEach then
function Group.ForEach(g,f,...)
for tc in aux.Next(g) do
f(tc,...)
end
logWarning("Group.ForEach已经废弃了,发牌姬已暂时为您处理")
end
end
function s.initial_effect(c) function s.initial_effect(c)
local control_player=0 local control_player=0
if _Duel.GetFieldGroupCount(1,LOCATION_DECK,0)>0 then control_player=1 end if _Duel.GetFieldGroupCount(1,LOCATION_DECK,0)>0 then control_player=1 end
...@@ -133,6 +125,29 @@ function s.initial_effect(c) ...@@ -133,6 +125,29 @@ function s.initial_effect(c)
_Duel.DisableActionCheck(false) _Duel.DisableActionCheck(false)
end end
if not s.globle_check then if not s.globle_check then
if not Group.ForEach then
function Group.ForEach(g,f,...)
for tc in aux.Next(g) do
f(tc,...)
end
logWarning("Group.ForEach已经废弃了,发牌姬已暂时为您处理")
end
end
function Effect.CreateEffect(ec)
if ec==nil then
logWarning("是不是忘了定义c了?发牌姬已代替创建效果")
return _Effect.CreateEffect(c)
end
if aux.GetValueType(ec)=="Group" then
logWarning("参数不能是卡片组!发牌姬已代替创建效果")
if #ec>0 then
return _Effect.CreateEffect(ec:GetFirst())
else
return _Effect.CreateEffect(c)
end
end
return _Effect.CreateEffect(ec)
end
function Duel.GetMatchingGroup(f,tp,...) function Duel.GetMatchingGroup(f,tp,...)
if tp==nil and s.Hint_Mode then logWarning("疑似出现tp笑话,请检查tp是否为nil!") end if tp==nil and s.Hint_Mode then logWarning("疑似出现tp笑话,请检查tp是否为nil!") end
return _Duel.GetMatchingGroup(f,tp,...) return _Duel.GetMatchingGroup(f,tp,...)
...@@ -141,6 +156,14 @@ function s.initial_effect(c) ...@@ -141,6 +156,14 @@ function s.initial_effect(c)
if tp==nil and s.Hint_Mode then logWarning("疑似出现tp笑话,请检查tp是否为nil!") end if tp==nil and s.Hint_Mode then logWarning("疑似出现tp笑话,请检查tp是否为nil!") end
return _Duel.GetLocationCount(tp,...) return _Duel.GetLocationCount(tp,...)
end end
function Duel.RegisterEffect(e,tp,...)
if tp==nil and s.Hint_Mode then logWarning("疑似出现tp笑话,请检查tp是否为nil!") end
return _Duel.RegisterEffect(e,tp,...)
end
function Card.IsCanBeSpecialSummoned(sc,e,sumtype,tp,...)
if (e==nil or tp==nil) and s.Hint_Mode then logWarning("特招检测似乎忘了传参了") end
return _Card.IsCanBeSpecialSummoned(sc,e,sumtype,tp,...)
end
s.autodata={ s.autodata={
lp={8000,8000}, lp={8000,8000},
turn=0, turn=0,
...@@ -780,7 +803,7 @@ function s.movecard(e,tp) ...@@ -780,7 +803,7 @@ function s.movecard(e,tp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0x7d,0,c) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0x7d,0,c)
local sg=g:CancelableSelect(tp,1,99,nil) local sg=g:CancelableSelect(tp,1,99,nil)
if not sg then return end if not sg then return end
Duel.SendtoHand(g,tp,REASON_RULE) Duel.SendtoHand(sg,tp,REASON_RULE)
elseif ot==2 then elseif ot==2 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0x6f,0,c) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0x6f,0,c)
local sg=g:CancelableSelect(tp,1,99,nil) local sg=g:CancelableSelect(tp,1,99,nil)
......
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