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)
end
end
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
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 max=max or #g
local ext_params={...}
......@@ -96,6 +99,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
sg:Merge(fg)
local finish=(#sg>=min and #sg<=max and f(sg,...))
while #sg<max do
Auxiliary.SubGroupCaptured=(g-sg):Filter(cm.srfilter,nil)
cm.CheckGroupRecursiveCapture(true,sg,g,f,min,max,ext_params)
local cg=Auxiliary.SubGroupCaptured:Clone()
Auxiliary.SubGroupCaptured:Clear()
......
......@@ -21,6 +21,7 @@ function cm.initial_effect(c)
e0:SetDescription(1165)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE+PHASE_BATTLE)
e0:SetCountLimit(1)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_GRAVE)
e0:SetCondition(cm.xyzcon)
......
......@@ -93,10 +93,10 @@ function c130006045.btop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(sg,nil,REASON_RULE)
local tg=Duel.GetMatchingGroup(c130006045.mmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=tg:GetFirst()
while tc and not tc:IsImmuneToEffect(e) do
while tc do
local zone=1<<tc:GetSequence()
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())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -106,9 +106,9 @@ function c130006045.btop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
tc=tg:GetNext()
end
local tgg=Duel.GetMatchingGroup(c130006045.mmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SendtoHand(tgg,nil,REASON_RULE)
end
end
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()))
......
--晶导算使 逻辑或门
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)
function c33201407.initial_effect(c)
--pendulum summon
......@@ -71,12 +86,12 @@ function c33201407.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
e2:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e2)
end
--
......
......@@ -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
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP+POS_FACEDOWN_DEFENSE)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
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
......@@ -115,6 +116,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,sg)
end
end
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)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.exfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
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
elseif op==1 then
Duel.Draw(tp,1,REASON_EFFECT)
......@@ -91,7 +91,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.exfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
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
elseif op==2 then
Duel.Recover(tp,2000,REASON_EFFECT)
......@@ -99,7 +99,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.exfilter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
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
......@@ -107,11 +107,11 @@ end
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
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
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
\ No newline at end of file
......@@ -28,6 +28,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
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