Commit 209dfbda authored by POLYMER's avatar POLYMER

fix

parent 57a157ee
...@@ -98,6 +98,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -98,6 +98,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
if #g>0 then if #g>0 then
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,3))
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
local ev0=Duel.GetCurrentChain() local ev0=Duel.GetCurrentChain()
......
...@@ -38,8 +38,7 @@ function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -38,8 +38,7 @@ function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp) function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup():Filter(cm.spfilter,nil,e,tp) local og=Duel.GetOperatedGroup():Filter(cm.spfilter,nil,e,tp)
if #og<=0 then return end if #og<=0 then return end
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
...@@ -68,8 +67,8 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,8 +67,8 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
local cg=spg:Filter(Card.IsFacedown,nil) local cg=spg:Filter(Card.IsFacedown,nil)
if #cg>0 then if #cg>0 and cg:GetFirst():IsLocation(LOCATION_MZONE) then
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,cg)
end end
end end
end end
......
...@@ -33,7 +33,7 @@ end ...@@ -33,7 +33,7 @@ end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,c,tc) then return end if not Duel.Equip(tp,c,tc) then return end
--equip limit --equip limit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -47,6 +47,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,6 +47,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if tg:GetCount()>0 then if tg:GetCount()>0 then
if Duel.SendtoHand(tg,nil,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then if Duel.SendtoHand(tg,nil,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEDOWN_DEFENSE) Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,c)
c:CompleteProcedure() c:CompleteProcedure()
end end
end end
...@@ -76,13 +77,13 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,13 +77,13 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
tg=tg:Select(tp,1,ft,nil) tg=tg:Select(tp,1,ft,nil)
end end
Duel.SSet(tp,tg) Duel.SSet(tp,tg)
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
...@@ -5,7 +5,6 @@ local s,id,o=GetID() ...@@ -5,7 +5,6 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--equip --equip
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
......
...@@ -3,7 +3,7 @@ function c78303060.initial_effect(c) ...@@ -3,7 +3,7 @@ function c78303060.initial_effect(c)
--pendulum --pendulum
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x746),nil,1) aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x746),aux.NonTuner(nil),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -19,8 +19,8 @@ function c78303060.initial_effect(c) ...@@ -19,8 +19,8 @@ function c78303060.initial_effect(c)
--move --move
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL) e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,88303060) e2:SetCountLimit(1,88303060)
e2:SetCondition(c78303060.pencon) e2:SetCondition(c78303060.pencon)
e2:SetTarget(c78303060.pentg) e2:SetTarget(c78303060.pentg)
......
...@@ -2,69 +2,69 @@ ...@@ -2,69 +2,69 @@
local m=89387013 local m=89387013
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x39),2,2) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x39),2,2)
c:EnableReviveLimit() c:EnableReviveLimit()
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetCondition(cm.condition) e2:SetCondition(cm.condition)
e2:SetTarget(cm.thtg) e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop) e2:SetOperation(cm.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES)
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_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m+100000000) e1:SetCountLimit(1,m+100000000)
e1:SetTarget(cm.thtg1) e1:SetTarget(cm.thtg1)
e1:SetOperation(cm.thop1) e1:SetOperation(cm.thop1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function cm.thfilter(c) function cm.thfilter(c)
return (c:IsSetCard(0x39) and c:IsType(TYPE_MONSTER) or c:IsCode(38049934,74845897)) and c:IsAbleToHand() return (c:IsSetCard(0x39) and c:IsType(TYPE_MONSTER) or c:IsCode(38049934,74845897)) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function cm.thfilter1(c) function cm.thfilter1(c)
return c:IsSetCard(0x39) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsFaceup() and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil,c) return c:IsSetCard(0x39) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsFaceup() and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil,c)
end end
function cm.tgfilter(c,tc) function cm.tgfilter(c,tc)
return c:IsSetCard(0x39) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and not c:IsCode(tc:GetCode()) return c:IsSetCard(0x39) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and not c:IsCode(tc:GetCode())
end end
function cm.thtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.thtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and cm.thfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and cm.thfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter1,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.thfilter1,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter1,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,cm.thfilter1,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function cm.thop1(e,tp,eg,ep,ev,re,r,rp) function cm.thop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
local sg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil,tc) local sg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil,tc)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT) Duel.SendtoGrave(tg,REASON_EFFECT)
end end
end end
end end
...@@ -97,6 +97,7 @@ function cm.ActivateCard(c,tp,oe) ...@@ -97,6 +97,7 @@ function cm.ActivateCard(c,tp,oe)
end end
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 ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph~=PHASE_DAMAGE and ph~=PHASE_DAMAGE_CAL and e:GetHandler():IsReason(REASON_EFFECT) return ph~=PHASE_DAMAGE and ph~=PHASE_DAMAGE_CAL and e:GetHandler():IsReason(REASON_EFFECT)
...@@ -177,7 +178,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -177,7 +178,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.symfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil,e) local g=Duel.GetMatchingGroup(cm.symfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil,e)
local tc=Duel.SelectMatchingCard(tp,cm.espfil3,tp,LOCATION_EXTRA,0,1,1,nil,g,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,cm.espfil3,tp,LOCATION_EXTRA,0,1,1,nil,g,e,tp):GetFirst()
cm.SubGroupParams={function(c,sc) return c:GetSynchroLevel(tc)==sc:GetSynchroLevel(tc) and (not cm.fparams or (cm.fparams[1](c,tc,table.unpack(cm.fparams,2))==cm.fparams[1](sc,tc,table.unpack(cm.fparams,2)))) end,Card.GetLevel,nil,false} cm.SubGroupParams={function(c,sc) return c:GetSynchroLevel(tc)==sc:GetSynchroLevel(tc) and (not cm.fparams or (cm.fparams[1](c,tc,table.unpack(cm.fparams,2))==cm.fparams[1](sc,tc,table.unpack(cm.fparams,2)))) end,Card.GetLevel,nil,false}
local mat1=cm.SelectSubGroup(g,tp,cm.espfil2,false,1,3,tc) local mat1=g:SelectSubGroup(tp,cm.espfil2,false,1,3,tc)
cm.SubGroupParams={} cm.SubGroupParams={}
cm.fparams=nil cm.fparams=nil
if mat1:IsExists(function(c) return c:IsLocation(LOCATION_MZONE) and c:IsFacedown() or c:IsLocation(LOCATION_HAND) end,1,nil) then if mat1:IsExists(function(c) return c:IsLocation(LOCATION_MZONE) and c:IsFacedown() or c:IsLocation(LOCATION_HAND) end,1,nil) then
...@@ -203,34 +204,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -203,34 +204,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
function cm.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsSetCard(0x181) or aux.IsCodeListed(c,56099748)) and c:IsFaceup() and c:IsSSetable()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.SelectTarget(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetCondition(cm.setcon)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function cm.fit1(c)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x181)
end
function cm.setcon(e,c)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(cm.fit1,tp,LOCATION_MZONE,0,1,nil)
end
--subgroup optimization --subgroup optimization
function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...) function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
......
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