Commit 23d16351 authored by POLYMER's avatar POLYMER

fix

parent 59afbe62
...@@ -90,6 +90,15 @@ function cm.initial_effect(c) ...@@ -90,6 +90,15 @@ function cm.initial_effect(c)
end end
end end
end end
function cm.MergedDelayEventCheck1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnCount()<=0 or not eg then return end
local c=e:GetHandler()
local eg2=eg:Filter(cm.cfilter,nil)+eg:Filter(cm.cfilter2,nil)
if #eg2>0 then
local _eg=eg2:Clone()
Duel.RaiseEvent(_eg,EVENT_CUSTOM+m,re,r,rp,ep,ev)
end
end
function cm.RegisterMergedDelayedEvent_ToSingleCard(c,code,events) function cm.RegisterMergedDelayedEvent_ToSingleCard(c,code,events)
local g=Group.CreateGroup() local g=Group.CreateGroup()
g:KeepAlive() g:KeepAlive()
......
...@@ -102,7 +102,9 @@ function cm.RegisterMergedEvent_ToSingleCard_AddOperation(c,g,event,event_code_s ...@@ -102,7 +102,9 @@ function cm.RegisterMergedEvent_ToSingleCard_AddOperation(c,g,event,event_code_s
EVENT_CHAIN_SOLVED, EVENT_CHAIN_SOLVED,
EVENT_CHAIN_END, EVENT_CHAIN_END,
EVENT_SUMMON, EVENT_SUMMON,
EVENT_SPSUMMON EVENT_SPSUMMON,
EVENT_MSET,
EVENT_BATTLE_DESTROYED
} }
for _,code in ipairs(ec) do for _,code in ipairs(ec) do
local ce=e1:Clone() local ce=e1:Clone()
...@@ -114,7 +116,8 @@ end ...@@ -114,7 +116,8 @@ end
function cm.MergedDelayEventCheck1_ToSingleCard(e,tp,eg,ep,ev,re,r,rp) function cm.MergedDelayEventCheck1_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject() local g=e:GetLabelObject()
local c=e:GetOwner() local c=e:GetOwner()
g:Merge(eg) if rp~=1-tp then return end
g:Merge(eg:Filter(function(c,tp) return c:IsType(TYPE_MONSTER) end,nil))
if Duel.CheckEvent(EVENT_MOVE) then if Duel.CheckEvent(EVENT_MOVE) then
local _,meg=Duel.CheckEvent(EVENT_MOVE,true) local _,meg=Duel.CheckEvent(EVENT_MOVE,true)
if meg:IsContains(c) and (c:IsFaceup() or c:IsPublic()) then if meg:IsContains(c) and (c:IsFaceup() or c:IsPublic()) then
...@@ -150,8 +153,7 @@ function cm.ThisCardMovedToPublicResetCheck_ToSingleCard(e,tp,eg,ep,ev,re,r,rp) ...@@ -150,8 +153,7 @@ function cm.ThisCardMovedToPublicResetCheck_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local num=eg:FilterCount(Card.IsType,nil,TYPE_MONSTER) return true --and rp==1-tp
return num>=1 and rp==1-tp
end end
function cm.tgfilter(c) function cm.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_GRAVE) return c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_GRAVE)
...@@ -164,7 +166,7 @@ function cm.spfilter2(c,e,tp) ...@@ -164,7 +166,7 @@ function cm.spfilter2(c,e,tp)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local num=eg:FilterCount(Card.IsType,nil,TYPE_MONSTER) local num=#eg --eg:FilterCount(Card.IsType,nil,TYPE_MONSTER)
local tg=eg:Filter(cm.tgfilter,nil) local tg=eg:Filter(cm.tgfilter,nil)
local spg=tg:Filter(cm.spfilter,nil,e,tp) local spg=tg:Filter(cm.spfilter,nil,e,tp)
if chk==0 then return (num>=2 or (Duel.IsPlayerAffectedByEffect(tp,11451481) and num>=1)) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and #spg>0 and c:GetFlagEffect(m)==0 end if chk==0 then return (num>=2 or (Duel.IsPlayerAffectedByEffect(tp,11451481) and num>=1)) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and #spg>0 and c:GetFlagEffect(m)==0 end
...@@ -197,7 +199,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -197,7 +199,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp return true --rp==1-tp
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsSetCard(0x97b) and c:IsAbleToHand() return c:IsSetCard(0x97b) and c:IsAbleToHand()
......
...@@ -56,7 +56,7 @@ function cm.initial_effect(c) ...@@ -56,7 +56,7 @@ function cm.initial_effect(c)
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(m,1)) e7:SetDescription(aux.Stringid(m,1))
e7:SetCategory(CATEGORY_SPECIAL_SUMMON) e7:SetCategory(CATEGORY_SPECIAL_SUMMON)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN) e7:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e7:SetCode(EVENT_REMOVE) e7:SetCode(EVENT_REMOVE)
e7:SetProperty(EFFECT_FLAG_DELAY) e7:SetProperty(EFFECT_FLAG_DELAY)
...@@ -210,7 +210,7 @@ function cm.spfilter2(c,e,tp) ...@@ -210,7 +210,7 @@ function cm.spfilter2(c,e,tp)
end end
function cm.adtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter2),tp,0xff,0,nil,e,tp) local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter2),tp,0xff,0,nil,e,tp)
if chk==0 then return e:GetHandler():GetSequence()<5 and #sg>0 end if chk==0 then return e:GetHandler():GetSequence()<5 end --and #sg>0 end
end end
function cm.adop(e,tp,eg,ep,ev,re,r,rp) function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -39,7 +39,9 @@ function cm.initial_effect(c) ...@@ -39,7 +39,9 @@ function cm.initial_effect(c)
EVENT_CHAIN_SOLVED, EVENT_CHAIN_SOLVED,
EVENT_CHAIN_END, EVENT_CHAIN_END,
EVENT_SUMMON, EVENT_SUMMON,
EVENT_SPSUMMON EVENT_SPSUMMON,
EVENT_MSET,
EVENT_BATTLE_DESTROYED
} }
for _,code in ipairs(ec) do for _,code in ipairs(ec) do
local ce=ge3:Clone() local ce=ge3:Clone()
......
...@@ -27,7 +27,9 @@ function cm.initial_effect(c) ...@@ -27,7 +27,9 @@ function cm.initial_effect(c)
EVENT_CHAIN_SOLVED, EVENT_CHAIN_SOLVED,
EVENT_CHAIN_END, EVENT_CHAIN_END,
EVENT_SUMMON, EVENT_SUMMON,
EVENT_SPSUMMON EVENT_SPSUMMON,
EVENT_MSET,
EVENT_BATTLE_DESTROYED
} }
for _,code in ipairs(ec) do for _,code in ipairs(ec) do
local ce=ge3:Clone() local ce=ge3:Clone()
......
...@@ -119,7 +119,9 @@ function cm.RegisterMergedEvent_ToSingleCard_AddOperation(c,g,event,event_code_s ...@@ -119,7 +119,9 @@ function cm.RegisterMergedEvent_ToSingleCard_AddOperation(c,g,event,event_code_s
EVENT_CHAIN_SOLVED, EVENT_CHAIN_SOLVED,
EVENT_CHAIN_END, EVENT_CHAIN_END,
EVENT_SUMMON, EVENT_SUMMON,
EVENT_SPSUMMON EVENT_SPSUMMON,
EVENT_MSET,
EVENT_BATTLE_DESTROYED
} }
for _,code in ipairs(ec) do for _,code in ipairs(ec) do
local ce=e1:Clone() local ce=e1:Clone()
......
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