Commit 9b4c2b1c authored by POLYMER's avatar POLYMER

fix

parent 996391e3
...@@ -80,10 +80,13 @@ function cm.CheckGroupRecursiveCapture(bool,sg,g,f,min,max,ext_params) ...@@ -80,10 +80,13 @@ function cm.CheckGroupRecursiveCapture(bool,sg,g,f,min,max,ext_params)
end end
end end
function cm.slfilter(c,sc) function cm.slfilter(c,sc)
return c:IsLocation(sc:GetLocation()) and c:IsLevel(sc:GetLevel()) return c:IsLocation(sc:GetLocation()) and (c:GetLevel()-sc:GetLevel())%5==0
end
function cm.srfilter(c)
return c:GetLevel()%5==0
end end
function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...) function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
Auxiliary.SubGroupCaptured=Group.CreateGroup() Auxiliary.SubGroupCaptured=g:Filter(cm.srfilter,nil)
local min=min or 1 local min=min or 1
local max=max or #g local max=max or #g
local ext_params={...} local ext_params={...}
...@@ -96,6 +99,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...) ...@@ -96,6 +99,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
sg:Merge(fg) sg:Merge(fg)
local finish=(#sg>=min and #sg<=max and f(sg,...)) local finish=(#sg>=min and #sg<=max and f(sg,...))
while #sg<max do while #sg<max do
Auxiliary.SubGroupCaptured=(g-sg):Filter(cm.srfilter,nil)
cm.CheckGroupRecursiveCapture(true,sg,g,f,min,max,ext_params) cm.CheckGroupRecursiveCapture(true,sg,g,f,min,max,ext_params)
local cg=Auxiliary.SubGroupCaptured:Clone() local cg=Auxiliary.SubGroupCaptured:Clone()
Auxiliary.SubGroupCaptured:Clear() Auxiliary.SubGroupCaptured:Clear()
......
...@@ -21,6 +21,7 @@ function cm.initial_effect(c) ...@@ -21,6 +21,7 @@ function cm.initial_effect(c)
e0:SetDescription(1165) e0:SetDescription(1165)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE+PHASE_BATTLE) e0:SetCode(EVENT_PHASE+PHASE_BATTLE)
e0:SetCountLimit(1)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_GRAVE) e0:SetRange(LOCATION_GRAVE)
e0:SetCondition(cm.xyzcon) e0:SetCondition(cm.xyzcon)
......
...@@ -93,10 +93,10 @@ function c130006045.btop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,10 +93,10 @@ function c130006045.btop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(sg,nil,REASON_RULE) Duel.SendtoHand(sg,nil,REASON_RULE)
local tg=Duel.GetMatchingGroup(c130006045.mmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local tg=Duel.GetMatchingGroup(c130006045.mmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
while tc and not tc:IsImmuneToEffect(e) do while tc do
local zone=1<<tc:GetSequence() local zone=1<<tc:GetSequence()
local ttp=tc:GetControler() local ttp=tc:GetControler()
if tc:IsImmuneToEffect(e) and Duel.MoveToField(tc,tp,ttp,LOCATION_SZONE,POS_FACEUP,true,zone) then if not tc:IsImmuneToEffect(e) and Duel.MoveToField(tc,tp,ttp,LOCATION_SZONE,POS_FACEUP,true,zone) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -106,9 +106,9 @@ function c130006045.btop(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,9 +106,9 @@ function c130006045.btop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
tc=tg:GetNext() tc=tg:GetNext()
end
local tgg=Duel.GetMatchingGroup(c130006045.mmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local tgg=Duel.GetMatchingGroup(c130006045.mmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SendtoHand(tgg,nil,REASON_RULE) Duel.SendtoHand(tgg,nil,REASON_RULE)
end
end end
function c130006045.ffilter(c,fc,sub,mg,sg) function c130006045.ffilter(c,fc,sub,mg,sg)
return c:IsFusionAttribute(ATTRIBUTE_WATER) and (not sg or not sg:IsExists(Card.IsRace,1,c,c:GetRace())) return c:IsFusionAttribute(ATTRIBUTE_WATER) and (not sg or not sg:IsExists(Card.IsRace,1,c,c:GetRace()))
......
--晶导算使 逻辑或门 --晶导算使 逻辑或门
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
xpcall(function() require("expansions/script/c33201401") end,function() require("script/c33201401") end) xpcall(function() require("expansions/script/c33201401") end,function() require("script/c33201401") end)
function c33201407.initial_effect(c) function c33201407.initial_effect(c)
--pendulum summon --pendulum summon
...@@ -71,12 +86,12 @@ function c33201407.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,12 +86,12 @@ function c33201407.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE) e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetValue(0) e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE) e2:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
-- --
......
...@@ -85,8 +85,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,8 +85,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if ct~=0 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if ct~=0 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP+POS_FACEDOWN_DEFENSE) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP+POS_FACEDOWN_DEFENSE)
if tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end
end end
end end
end end
...@@ -115,6 +116,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -115,6 +116,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,sg)
end end
end end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -83,7 +83,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,7 +83,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.exfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.exfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
end end
elseif op==1 then elseif op==1 then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
...@@ -91,7 +91,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,7 +91,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.exfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.exfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
end end
elseif op==2 then elseif op==2 then
Duel.Recover(tp,2000,REASON_EFFECT) Duel.Recover(tp,2000,REASON_EFFECT)
...@@ -99,7 +99,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,7 +99,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.exfilter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.exfilter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
end end
end end
end end
...@@ -107,11 +107,11 @@ end ...@@ -107,11 +107,11 @@ end
function cm.exfilter1(c,e,tp) function cm.exfilter1(c,e,tp)
return c:IsCode(60002144) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(60002144) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end end
function cm.exfilter2(c,e,tp) function cm.exfilter2(c,e,tp)
return c:IsCode(60002145) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(60002145) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end end
function cm.exfilter3(c,e,tp) function cm.exfilter3(c,e,tp)
return c:IsCode(60002146) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(60002146) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end end
\ No newline at end of file
...@@ -28,6 +28,7 @@ function cm.initial_effect(c) ...@@ -28,6 +28,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SUMMON) e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
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