Commit e1c6ce34 authored by POLYMER's avatar POLYMER

fix

parent 7aafaf12
...@@ -146,13 +146,13 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -146,13 +146,13 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
if KOISHI_CHECK then if KOISHI_CHECK then
Duel.ResetTimeLimit(0,600) Duel.ResetTimeLimit(0,999)
Duel.ResetTimeLimit(1,600) Duel.ResetTimeLimit(1,999)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE_START+PHASE_DRAW) e0:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e0:SetCountLimit(1) e0:SetCountLimit(1)
e0:SetOperation(function() Duel.ResetTimeLimit(0,600) Duel.ResetTimeLimit(1,600) end) e0:SetOperation(function() Duel.ResetTimeLimit(0,999) Duel.ResetTimeLimit(1,999) end)
Duel.RegisterEffect(e0,0) Duel.RegisterEffect(e0,0)
end end
local ag=Duel.GetMatchingGroup(cm.nnfilter,0,0xff,0xff,nil) local ag=Duel.GetMatchingGroup(cm.nnfilter,0,0xff,0xff,nil)
......
...@@ -27,7 +27,7 @@ function cm.initial_effect(c) ...@@ -27,7 +27,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(cm.hand) e2:SetCondition(cm.hand)
e2:SetDescription(aux.Stringid(m,3)) e2:SetDescription(aux.Stringid(m,8))
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
......
...@@ -99,14 +99,14 @@ end ...@@ -99,14 +99,14 @@ end
function cm.chkop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.chkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local ref=c:GetReasonEffect() local ref=c:GetReasonEffect()
if c:IsReason(REASON_COST) and ref and ref:GetCode()==EFFECT_SPSUMMON_PROC and ref:GetHandler():IsRace(RACE_INSECT) then if (c:IsReason(REASON_COST) or c:IsReason(REASON_MATERIAL)) and ref and ref:GetCode()==EFFECT_SPSUMMON_PROC and ref:GetHandler():IsRace(RACE_INSECT) then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,7)) c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,7))
end end
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ref=c:GetReasonEffect() local ref=c:GetReasonEffect()
return c:IsReason(REASON_COST) and ref and ref:GetCode()==EFFECT_SPSUMMON_PROC and ref:GetHandler():IsRace(RACE_INSECT) and not c:IsPreviousLocation(LOCATION_REMOVED) return (c:IsReason(REASON_COST) or c:IsReason(REASON_MATERIAL)) and ref and ref:GetCode()==EFFECT_SPSUMMON_PROC and ref:GetHandler():IsRace(RACE_INSECT) and not c:IsPreviousLocation(LOCATION_REMOVED)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
...@@ -185,7 +185,7 @@ function cm.efop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -185,7 +185,7 @@ function cm.efop1(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.flfilter,nil) local g=eg:Filter(cm.flfilter,nil)
for c in aux.Next(g) do for c in aux.Next(g) do
local ref=c:GetReasonEffect() local ref=c:GetReasonEffect()
if not ((c:IsLocation(LOCATION_SZONE) and c:IsReason(REASON_COST) or c:IsReason(REASON_MATERIAL)) and ref and ref:GetCode()==EFFECT_SPSUMMON_PROC) then return end if not (c:IsLocation(LOCATION_SZONE) and (c:IsReason(REASON_COST) or c:IsReason(REASON_MATERIAL) or c:IsReason(REASON_SPSUMMON)) and ref and ref:GetCode()==EFFECT_SPSUMMON_PROC) then return end
local rc=ref:GetHandler() local rc=ref:GetHandler()
if not rc then return end if not rc then return end
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
......
...@@ -77,7 +77,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +77,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if lc then if lc then
local _SendToGrave=Duel.SendtoGrave local _SendToGrave=Duel.SendtoGrave
Duel.SendtoGrave=function(tg,r) Duel.SendtoGrave=function(tg,r)
if r==REASON_MATERIAL+REASON_LINK then if r&(REASON_MATERIAL+REASON_LINK)==REASON_MATERIAL+REASON_LINK then
local ct=Duel.Destroy(tg,r|REASON_RULE) local ct=Duel.Destroy(tg,r|REASON_RULE)
Duel.SendtoGrave=_SendToGrave Duel.SendtoGrave=_SendToGrave
return ct return ct
......
...@@ -158,7 +158,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -158,7 +158,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end--]] end--]]
local _SendtoGrave=Duel.SendtoGrave local _SendtoGrave=Duel.SendtoGrave
Duel.SendtoGrave=function(g,r) Duel.SendtoGrave=function(g,r)
if r==REASON_MATERIAL+REASON_SYNCHRO then if r&(REASON_MATERIAL+REASON_SYNCHRO)==REASON_MATERIAL+REASON_SYNCHRO then
local rg=g:Filter(Card.IsAbleToRemove,nil,tp,POS_FACEUP,REASON_MATERIAL+REASON_SYNCHRO) local rg=g:Filter(Card.IsAbleToRemove,nil,tp,POS_FACEUP,REASON_MATERIAL+REASON_SYNCHRO)
g:Sub(rg) g:Sub(rg)
local ct1=_SendtoGrave(g,r) local ct1=_SendtoGrave(g,r)
......
...@@ -185,7 +185,7 @@ function c28322413.ruop(e,tp,eg,ep,ev,re,r,rp) ...@@ -185,7 +185,7 @@ function c28322413.ruop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetOperation(c28322413.adop) e1:SetOperation(c28322413.adop)
e1:SetLabel(ct) e1:SetLabel(ct)
e1:SetLabelObject(c) e1:SetLabelObject(e:GetHandler())
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
table.insert(c28322413.et,{e1}) table.insert(c28322413.et,{e1})
end end
......
...@@ -47,7 +47,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,7 +47,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=nil local g=nil
if ft>-1 then if ft>-1 then
local loc=0 local loc=0
if Duel.IsPlayerAffectedByEffect(tp,88581108) then loc=LOCATION_MZONE end --if Duel.IsPlayerAffectedByEffect(tp,88581108) then loc=LOCATION_MZONE end
g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,loc,c) g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,loc,c)
else else
g=Duel.GetMatchingGroup(cm.desfilter2,tp,LOCATION_MZONE,0,c) g=Duel.GetMatchingGroup(cm.desfilter2,tp,LOCATION_MZONE,0,c)
...@@ -64,7 +64,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=nil local g=nil
if ft>-1 then if ft>-1 then
local loc=0 local loc=0
if Duel.IsPlayerAffectedByEffect(tp,88581108) then loc=LOCATION_MZONE end --if Duel.IsPlayerAffectedByEffect(tp,88581108) then loc=LOCATION_MZONE end
g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,loc,c) g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,loc,c)
else else
g=Duel.GetMatchingGroup(cm.desfilter2,tp,LOCATION_MZONE,0,c) g=Duel.GetMatchingGroup(cm.desfilter2,tp,LOCATION_MZONE,0,c)
...@@ -100,7 +100,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -100,7 +100,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end
local g=Duel.GetDecktopGroup(tp,3) local g=Duel.GetDecktopGroup(tp,3)
local result=g:FilterCount(Card.IsAbleToHand,nil)>0 local result=g:FilterCount(Card.IsType,nil,TYPE_MONSTER)>0
return result return result
end end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
...@@ -112,7 +112,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -112,7 +112,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(p,3) local g=Duel.GetDecktopGroup(p,3)
if g:GetCount()>0 and g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then if g:GetCount()>0 and g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON)
local sg=g:Select(p,1,1,nil) local sg=g:FilterSelect(p,Card.IsType,1,1,nil,TYPE_MONSTER)
if sg:GetFirst():IsCanBeSpecialSummoned(e,0,p,false,false) then if sg:GetFirst():IsCanBeSpecialSummoned(e,0,p,false,false) then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
else else
......
...@@ -47,7 +47,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,7 +47,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=nil local g=nil
if ft>-1 then if ft>-1 then
local loc=0 local loc=0
if Duel.IsPlayerAffectedByEffect(tp,88581108) then loc=LOCATION_MZONE end --if Duel.IsPlayerAffectedByEffect(tp,88581108) then loc=LOCATION_MZONE end
g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,loc,c) g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,loc,c)
else else
g=Duel.GetMatchingGroup(cm.desfilter2,tp,LOCATION_MZONE,0,c) g=Duel.GetMatchingGroup(cm.desfilter2,tp,LOCATION_MZONE,0,c)
...@@ -64,7 +64,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=nil local g=nil
if ft>-1 then if ft>-1 then
local loc=0 local loc=0
if Duel.IsPlayerAffectedByEffect(tp,88581108) then loc=LOCATION_MZONE end --if Duel.IsPlayerAffectedByEffect(tp,88581108) then loc=LOCATION_MZONE end
g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,loc,c) g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,loc,c)
else else
g=Duel.GetMatchingGroup(cm.desfilter2,tp,LOCATION_MZONE,0,c) g=Duel.GetMatchingGroup(cm.desfilter2,tp,LOCATION_MZONE,0,c)
...@@ -100,7 +100,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -100,7 +100,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end
local g=Duel.GetDecktopGroup(tp,3) local g=Duel.GetDecktopGroup(tp,3)
local result=g:FilterCount(Card.IsAbleToHand,nil)>0 local result=g:FilterCount(Card.IsType,nil,TYPE_MONSTER)>0
return result return result
end end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
...@@ -112,7 +112,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -112,7 +112,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(p,3) local g=Duel.GetDecktopGroup(p,3)
if g:GetCount()>0 and g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then if g:GetCount()>0 and g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON)
local sg=g:Select(p,1,1,nil) local sg=g:FilterSelect(p,Card.IsType,1,1,nil,TYPE_MONSTER)
if sg:GetFirst():IsCanBeSpecialSummoned(e,0,p,false,false) then if sg:GetFirst():IsCanBeSpecialSummoned(e,0,p,false,false) then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
else else
......
...@@ -5,6 +5,7 @@ function cm.initial_effect(c) ...@@ -5,6 +5,7 @@ function cm.initial_effect(c)
--material --material
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(31755044,0)) e1:SetDescription(aux.Stringid(31755044,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
...@@ -69,14 +70,14 @@ function cm.matop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,14 +70,14 @@ function cm.matop(e,tp,eg,ep,ev,re,r,rp)
i=i+1 i=i+1
end end
if Duel.IsExistingMatchingCard(cm.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,raceo,attro,races,attrs) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if Duel.IsExistingMatchingCard(cm.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,raceo,attro,races,attrs,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local sc=Duel.GetMatchingGroup(cm.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,raceo,attro,races,attrs):Select(tp,1,1,nil) local sc=Duel.GetMatchingGroup(cm.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,raceo,attro,races,attrs,e,tp):Select(tp,1,1,nil)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function cm.spfil(c,raceo,attro,races,attrs) function cm.spfil(c,raceo,attro,races,attrs,e,tp)
return not c:IsRace(raceo) and not c:IsAttribute(attro) and not c:IsRace(races) and not c:IsAttribute(attrs) and c:IsType(TYPE_MONSTER) return not c:IsRace(raceo) and not c:IsAttribute(attro) and not c:IsRace(races) and not c:IsAttribute(attrs) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.repfilter(c,tp,races,attrs) function cm.repfilter(c,tp,races,attrs)
return c:IsControler(tp) and c:IsOnField() and not c:IsAttribute(races) and not c:IsRace(attrs) return c:IsControler(tp) and c:IsOnField() and not c:IsAttribute(races) and not c:IsRace(attrs)
......
...@@ -20,6 +20,7 @@ function cm.initial_effect(c) ...@@ -20,6 +20,7 @@ function cm.initial_effect(c)
e11:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e11:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e11:SetRange(LOCATION_HAND) e11:SetRange(LOCATION_HAND)
e11:SetCode(EVENT_SPSUMMON_SUCCESS) e11:SetCode(EVENT_SPSUMMON_SUCCESS)
e11:SetProperty(EFFECT_FLAG_DELAY)
e11:SetCountLimit(1,m+10000000) e11:SetCountLimit(1,m+10000000)
e11:SetCondition(cm.spcon) e11:SetCondition(cm.spcon)
e11:SetTarget(cm.sptg) e11:SetTarget(cm.sptg)
......
...@@ -6,6 +6,7 @@ function cm.initial_effect(c) ...@@ -6,6 +6,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.con)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--change effect type --change effect type
...@@ -44,15 +45,16 @@ end ...@@ -44,15 +45,16 @@ end
function cm.mfilter(c) function cm.mfilter(c)
return c:IsFaceup() and c:IsCode(60010079) return c:IsFaceup() and c:IsCode(60010079)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetFlagEffect(tp,m)==0
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local b1=false
local b2=false local b2=false
if Duel.GetFlagEffect(tp,m)==0 then b1=true end
if not Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) then b2=true end if not Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) then b2=true end
if b1==false then return end
if b2==true then if b2==true then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,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,false,false,POS_FACEUP)
end end
......
...@@ -6,6 +6,7 @@ function cm.initial_effect(c) ...@@ -6,6 +6,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -13,6 +14,13 @@ end ...@@ -13,6 +14,13 @@ end
if not cm.num then if not cm.num then
cm.num=0 cm.num=0
end end
function cm.sfil(c)
return c:GetFlagEffect(m)~=0
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.sfil,tp,LOCATION_HAND,0,nil)
return #g==0
end
function cm.filter(c) function cm.filter(c)
return c:IsSetCard(0x647) and c:IsAbleToHand() and not c:IsCode(60010094) return c:IsSetCard(0x647) and c:IsAbleToHand() and not c:IsCode(60010094)
end end
...@@ -27,12 +35,12 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,12 +35,12 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function cm.sfil(c) function cm.sfil(c)
return c:GetFlagEffect(m)~=0 return c:GetFlagEffect(m)~=0
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local hg=Duel.GetMatchingGroup(cm.sfil,tp,LOCATION_HAND,0,nil) local hg=Duel.GetMatchingGroup(cm.sfil,tp,LOCATION_HAND,0,nil)
if #hg~=0 then return end if #hg~=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
...@@ -44,6 +52,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,6 +52,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,2,REASON_EFFECT) Duel.Draw(tp,2,REASON_EFFECT)
end end
local mg=Duel.GetOperatedGroup() local mg=Duel.GetOperatedGroup()
mg:Merge(g)
local tc=mg:GetFirst() local tc=mg:GetFirst()
for i=1,#mg do for i=1,#mg do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -57,7 +66,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +66,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1) tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
tc=mg:GetNext() tc=mg:GetNext()
end end
cm.num=#Duel.GetOperatedGroup() cm.num=#mg
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
...@@ -128,7 +128,7 @@ end ...@@ -128,7 +128,7 @@ end
function c65010030.rmfilter1(c,tp) function c65010030.rmfilter1(c,tp)
local att=c:GetAttribute() local att=c:GetAttribute()
return c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToRemove() return c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToRemove()
and Duel.IsExistingMatchingCard(c65010030.rmfilter2,tp,0,LOCATION_MZONE,1,nil,att) and Duel.IsExistingMatchingCard(c65010030.rmfilter2,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil,att)
end end
function c65010030.rmfilter2(c,att) function c65010030.rmfilter2(c,att)
return c:IsFaceup() and c:IsAttribute(att) and c:IsAbleToRemove() return c:IsFaceup() and c:IsAttribute(att) and c:IsAbleToRemove()
......
--神蚀机鸮 --ʴ^
local m=88880034 local m=88880034
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
...@@ -6,9 +6,11 @@ function cm.initial_effect(c) ...@@ -6,9 +6,11 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND) e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(cm.fntg) e1:SetTarget(cm.fntg)
e1:SetOperation(cm.fnop) e1:SetOperation(cm.fnop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -71,6 +71,7 @@ function Auxiliary.PreloadUds() ...@@ -71,6 +71,7 @@ function Auxiliary.PreloadUds()
return temp_f(...) return temp_f(...)
end end
end end
Auxiliary=Auxiliary or {}
if not Auxiliary.GetMustMaterialGroup then if not Auxiliary.GetMustMaterialGroup then
Auxiliary.GetMustMaterialGroup=Duel.GetMustMaterial Auxiliary.GetMustMaterialGroup=Duel.GetMustMaterial
end end
...@@ -100,5 +101,27 @@ function Auxiliary.PreloadUds() ...@@ -100,5 +101,27 @@ function Auxiliary.PreloadUds()
end end
end end
end end
function Auxiliary.AddPlaceToPZoneIfDestroyEffect(c)
--pendulum
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(13331639,3))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end)
c:RegisterEffect(e1)
end
--require("script/procedure.lua") --require("script/procedure.lua")
end end
\ No newline at end of file
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