Commit 878f0269 authored by Nemo Ma's avatar Nemo Ma

fix

parent d683af55
...@@ -76,7 +76,7 @@ function cm.adfilter(c,tc,ec) ...@@ -76,7 +76,7 @@ function cm.adfilter(c,tc,ec)
e1:SetValue(POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE) e1:SetValue(POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local res=c:IsSummonable(true,nil,1) local res=c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
e1:Reset() e1:Reset()
return res return res
end end
...@@ -91,10 +91,21 @@ function cm.adcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -91,10 +91,21 @@ function cm.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
sg=g:Select(tp,1,1,nil) sg=g:Select(tp,1,1,nil)
Duel.Overlay(c,sg) Duel.Overlay(c,sg)
end end
function cm.smfilter(c)
return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
end
function cm.adop(e,tp,eg,ep,ev,re,r,rp) function cm.adop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local tc=Duel.SelectMatchingCard(tp,Card.IsSummonable,tp,LOCATION_HAND,0,1,1,nil,true,nil,1):GetFirst() local tc=Duel.SelectMatchingCard(tp,cm.smfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
if tc then Duel.Summon(tp,tc,true,nil,1) end if tc then
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
else
Duel.MSet(tp,tc,true,nil,1)
end
end
end end
function cm.tcfilter(c) function cm.tcfilter(c)
return c:IsHasEffect(m) return c:IsHasEffect(m)
......
...@@ -46,7 +46,7 @@ end ...@@ -46,7 +46,7 @@ end
function cm.filter1(c) function cm.filter1(c)
return c:IsSetCard(0x10) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsSetCard(0x10) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end end
function cm.filter2(c,mg) function cm.filter2(c,mg,tp)
return (c:IsSynchroSummonable(nil,mg) or c:IsLinkSummonable(mg)) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0 return (c:IsSynchroSummonable(nil,mg) or c:IsLinkSummonable(mg)) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end end
function cm.filter3(c) function cm.filter3(c)
...@@ -56,7 +56,7 @@ function cm.sltg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,7 +56,7 @@ function cm.sltg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE,0,2,nil) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,mg) and e:GetHandler():GetFlagEffect(m)==0 end if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE,0,2,nil) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,mg,tp) and e:GetHandler():GetFlagEffect(m)==0 end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_GRAVE,0,2,2,nil) local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_GRAVE,0,2,2,nil)
......
...@@ -41,7 +41,7 @@ function cm.dptcheck(g) ...@@ -41,7 +41,7 @@ function cm.dptcheck(g)
end end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp) function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_MZONE,0,nil)
return mg:CheckSubGroup(cm.dptcheck,2,99) return mg:CheckSubGroup(cm.dptcheck,2,99) and e:GetHandler():IsSSetable()
end end
function cm.setop(e,tp,eg,ep,ev,re,r,rp) function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -189,12 +189,26 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c,sg,og) ...@@ -189,12 +189,26 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
if #bg==0 then return end if #bg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local bc=bg:Select(tp,1,1,nil):GetFirst() local bc=bg:Select(tp,1,1,nil):GetFirst()
sg:AddCard(c)
sg:AddCard(bc) sg:AddCard(bc)
c:SetMaterial(g) sg:AddCard(c)
bc:SetMaterial(g) bc:SetMaterial(g)
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO) Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup() g:KeepAlive()
cm[0]=g
cm[1]=e
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON)
e1:SetCountLimit(1)
e1:SetOperation(cm.adjustop2)
Duel.RegisterEffect(e1,tp)
end
end
function cm.adjustop2(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(cm[0],EVENT_BE_MATERIAL,cm[1],REASON_SYNCHRO,tp,tp,0)
for tc in aux.Next(cm[0]) do
Duel.RaiseSingleEvent(tc,EVENT_BE_MATERIAL,cm[1],REASON_SYNCHRO,tp,tp,0)
end end
end end
function cm.sycon(e,tp,eg,ep,ev,re,r,rp) function cm.sycon(e,tp,eg,ep,ev,re,r,rp)
...@@ -226,7 +240,7 @@ function cm.syop(e,tp,eg,ep,ev,re,r,rp) ...@@ -226,7 +240,7 @@ function cm.syop(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_SPSUMMON) e2:SetCode(EVENT_MOVE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
e2:SetOperation(cm.adjustop) e2:SetOperation(cm.adjustop)
......
...@@ -54,6 +54,7 @@ function cm.initial_effect(c) ...@@ -54,6 +54,7 @@ function cm.initial_effect(c)
e7:SetType(EFFECT_TYPE_QUICK_O) e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN) e7:SetCode(EVENT_FREE_CHAIN)
e7:SetRange(LOCATION_HAND) e7:SetRange(LOCATION_HAND)
e7:SetCountLimit(1,m)
e7:SetCost(cm.efcost) e7:SetCost(cm.efcost)
e7:SetTarget(cm.eftg) e7:SetTarget(cm.eftg)
e7:SetOperation(cm.efop) e7:SetOperation(cm.efop)
...@@ -118,13 +119,16 @@ function cm.efop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -118,13 +119,16 @@ function cm.efop(e,tp,eg,ep,ev,re,r,rp,chk)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
--indes --indes
local e4=Effect.CreateEffect(e:GetHandler()) local e4=Effect.CreateEffect(e:GetHandler())
e4:SetDescription(aux.Stringid(14010087,0))
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1) e4:SetValue(1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4,true) tc:RegisterEffect(e4,true)
Duel.BreakEffect()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end end
end end
function cm.e2filter(e,re) function cm.e2filter(e,re)
......
...@@ -9,8 +9,7 @@ function c33200658.initial_effect(c) ...@@ -9,8 +9,7 @@ function c33200658.initial_effect(c)
e1:SetCategory(CATEGORY_CONTROL) e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,33200658) e1:SetCountLimit(1,33200658)
e1:SetCondition(c33200658.ccon) e1:SetCondition(c33200658.ccon)
e1:SetTarget(c33200658.ctg) e1:SetTarget(c33200658.ctg)
......
...@@ -20,7 +20,7 @@ function c33200724.initial_effect(c) ...@@ -20,7 +20,7 @@ function c33200724.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c33200724.filter(c,e,tp) function c33200724.filter(c,e,tp)
return c:IsSetCard(0xc32a) and not c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsSetCard(0xc32a) and not c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end end
function c33200724.filter2(c) function c33200724.filter2(c)
return c:IsFaceup() and c:IsCanAddCounter(0x32a,2) return c:IsFaceup() and c:IsCanAddCounter(0x32a,2)
...@@ -35,7 +35,7 @@ function c33200724.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function c33200724.spop(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,c33200724.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c33200724.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) and Duel.IsExistingMatchingCard(c33200724.filter2,tp,LOCATION_ONFIELD,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200724,2)) then if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) and Duel.IsExistingMatchingCard(c33200724.filter2,tp,LOCATION_ONFIELD,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200724,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local sg=Duel.SelectMatchingCard(tp,c33200724.filter2,tp,LOCATION_ONFIELD,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,c33200724.filter2,tp,LOCATION_ONFIELD,0,1,1,nil)
if sg:GetCount()>0 then if sg:GetCount()>0 then
......
...@@ -6,7 +6,7 @@ function c33200730.initial_effect(c) ...@@ -6,7 +6,7 @@ function c33200730.initial_effect(c)
--tohand --tohand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33200730,0)) e1:SetDescription(aux.Stringid(33200730,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
...@@ -40,7 +40,7 @@ function c33200730.spfilter(c) ...@@ -40,7 +40,7 @@ function c33200730.spfilter(c)
return c:IsSetCard(0xc32a) and c:IsFaceup() and c:IsAbleToRemove() return c:IsSetCard(0xc32a) and c:IsFaceup() and c:IsAbleToRemove()
end end
function c33200730.thfilter(c) function c33200730.thfilter(c)
return c:IsSetCard(0xc32a) and c:IsAbleToHand() return c:IsAbleToHand()
end end
function c33200730.spcon(e,tp,eg,ep,ev,re,r,rp) function c33200730.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
...@@ -68,9 +68,8 @@ function c33200730.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,9 +68,8 @@ function c33200730.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
if Duel.IsExistingMatchingCard(c33200730.thfilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200730,2)) then if Duel.IsExistingMatchingCard(c33200730.thfilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200730,2)) then
local sg=Duel.SelectMatchingCard(tp,c33200730.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil) local sg=Duel.SelectMatchingCard(tp,c33200730.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
local thtc=sg:GetFirst() Duel.HintSelection(sg)
Duel.HintSelection(thtc) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.SendtoHand(thtc,nil,REASON_EFFECT)
end end
end end
end end
......
...@@ -53,7 +53,7 @@ function c33200732.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +53,7 @@ function c33200732.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,c33200732.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,c33200732.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if sg:GetCount()>0 and Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) and g:GetCount()>0 then if sg:GetCount()>0 and Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) and g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
function c33200732.retcon(e,tp,eg,ep,ev,re,r,rp) function c33200732.retcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -86,21 +86,21 @@ function c33200737.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,21 +86,21 @@ function c33200737.rmop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
end end
......
...@@ -81,7 +81,7 @@ function c33200742.ccon(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +81,7 @@ function c33200742.ccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function c33200742.spfilter(c,e,tp) function c33200742.spfilter(c,e,tp)
return c:IsSetCard(0xc32a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xc32a) and not c:IsCode(33200742) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c33200742.ctg(e,tp,eg,ep,ev,re,r,rp,chk) function c33200742.ctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c33200742.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c33200742.spfilter(chkc,e,tp) end
......
...@@ -58,7 +58,7 @@ function cm.LinkOperation(f,minc,maxc,gf) ...@@ -58,7 +58,7 @@ function cm.LinkOperation(f,minc,maxc,gf)
end end
end end
function cm.lcheck(c) function cm.lcheck(c)
return (c:IsLevelBelow(4) and c:IsSetCard(0x562)) or c:GetOriginalCode()==33300308 return c:IsLinkSetCard(0x562) or (c:GetOriginalCode()==33300308 and not c:IsDisabled())
end end
function cm.extracheck(c) function cm.extracheck(c)
return c:IsFaceup() and c:GetOriginalCode()==33300308 return c:IsFaceup() and c:GetOriginalCode()==33300308
...@@ -69,25 +69,26 @@ end ...@@ -69,25 +69,26 @@ end
function cm.lcon(...) function cm.lcon(...)
local f=aux.GetLinkMaterials local f=aux.GetLinkMaterials
aux.GetLinkMaterials=cm.GetLinkMaterials aux.GetLinkMaterials=cm.GetLinkMaterials
local res=Auxiliary.LinkCondition(nil,1,1,cm.gf)(...) local res=Auxiliary.LinkCondition(nil,2,2,cm.gf)(...)
aux.GetLinkMaterials=f aux.GetLinkMaterials=f
return res return res
end end
function cm.ltg(...) function cm.ltg(...)
local f=aux.GetLinkMaterials local f=aux.GetLinkMaterials
aux.GetLinkMaterials=cm.GetLinkMaterials aux.GetLinkMaterials=cm.GetLinkMaterials
local res=Auxiliary.LinkTarget(nil,1,1,cm.gf)(...) local res=Auxiliary.LinkTarget(nil,2,2,cm.gf)(...)
aux.GetLinkMaterials=f aux.GetLinkMaterials=f
return res return res
end end
function cm.GetLinkMaterials(tp,f,lc) function cm.GetLinkMaterials(tp,f,lc,e)
local mg=Duel.GetMatchingGroup(Auxiliary.LConditionFilter,tp,LOCATION_MZONE,0,nil,f,lc) local mg=Duel.GetMatchingGroup(Auxiliary.LConditionFilter,tp,LOCATION_MZONE,0,nil,f,lc,e)
local mg2=Duel.GetMatchingGroup(Auxiliary.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp) local mg2=Duel.GetMatchingGroup(Auxiliary.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp)
local mg3=Duel.GetMatchingGroup(cm.extracheck,tp,LOCATION_SZONE,0,nil) local mg3=Duel.GetMatchingGroup(cm.extracheck,tp,LOCATION_SZONE,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end if mg2:GetCount()>0 then mg:Merge(mg2) end
if mg3:GetCount()>0 then mg:Merge(mg3) end if mg3:GetCount()>0 then mg:Merge(mg3) end
return mg return mg
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spcheck,tp,LOCATION_GRAVE,0,1,nil,e,tp) and e:GetHandler():IsAbleToGrave() end if chk==0 then return Duel.IsExistingMatchingCard(cm.spcheck,tp,LOCATION_GRAVE,0,1,nil,e,tp) and e:GetHandler():IsAbleToGrave() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
......
...@@ -30,12 +30,14 @@ function cm.IsLinkZoneOver(count) ...@@ -30,12 +30,14 @@ function cm.IsLinkZoneOver(count)
for i=0,4 do for i=0,4 do
if (Duel.GetLinkedZone(0)&((2^i)<<0))~=0 then if (Duel.GetLinkedZone(0)&((2^i)<<0))~=0 then
flag=flag+1 flag=flag+1
elseif (Duel.GetLinkedZone(1)&((2^i)<<0))~=0 then end
if (Duel.GetLinkedZone(1)&((2^i)<<0))~=0 then
flag=flag+1 flag=flag+1
end end
end end
return flag>=count return flag>=count
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 cm.IsLinkZoneOver(3) return cm.IsLinkZoneOver(3)
end end
......
...@@ -35,12 +35,14 @@ function cm.IsLinkZoneOver(count) ...@@ -35,12 +35,14 @@ function cm.IsLinkZoneOver(count)
for i=0,4 do for i=0,4 do
if (Duel.GetLinkedZone(0)&((2^i)<<0))~=0 then if (Duel.GetLinkedZone(0)&((2^i)<<0))~=0 then
flag=flag+1 flag=flag+1
elseif (Duel.GetLinkedZone(1)&((2^i)<<0))~=0 then end
if (Duel.GetLinkedZone(1)&((2^i)<<0))~=0 then
flag=flag+1 flag=flag+1
end end
end end
return flag>=count return flag>=count
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsType(TYPE_LINK) and c:IsSetCard(0x562) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_LINK) and c:IsSetCard(0x562) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
......
...@@ -57,12 +57,14 @@ function cm.IsLinkZoneOver(count) ...@@ -57,12 +57,14 @@ function cm.IsLinkZoneOver(count)
for i=0,4 do for i=0,4 do
if (Duel.GetLinkedZone(0)&((2^i)<<0))~=0 then if (Duel.GetLinkedZone(0)&((2^i)<<0))~=0 then
flag=flag+1 flag=flag+1
elseif (Duel.GetLinkedZone(1)&((2^i)<<0))~=0 then end
if (Duel.GetLinkedZone(1)&((2^i)<<0))~=0 then
flag=flag+1 flag=flag+1
end end
end end
return flag>=count return flag>=count
end end
function cm.hspcon(e,c) function cm.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
......
...@@ -59,7 +59,7 @@ function cm.LinkOperation(f,minc,maxc,gf) ...@@ -59,7 +59,7 @@ function cm.LinkOperation(f,minc,maxc,gf)
end end
end end
function cm.lcheck(c) function cm.lcheck(c)
return c:IsSetCard(0x562) or c:GetOriginalCode()==33300308 return c:IsLinkSetCard(0x562) or (c:GetOriginalCode()==33300308 and not c:IsDisabled())
end end
function cm.extracheck(c) function cm.extracheck(c)
return c:IsFaceup() and c:GetOriginalCode()==33300308 return c:IsFaceup() and c:GetOriginalCode()==33300308
...@@ -81,14 +81,15 @@ function cm.ltg(...) ...@@ -81,14 +81,15 @@ function cm.ltg(...)
aux.GetLinkMaterials=f aux.GetLinkMaterials=f
return res return res
end end
function cm.GetLinkMaterials(tp,f,lc) function cm.GetLinkMaterials(tp,f,lc,e)
local mg=Duel.GetMatchingGroup(Auxiliary.LConditionFilter,tp,LOCATION_MZONE,0,nil,f,lc) local mg=Duel.GetMatchingGroup(Auxiliary.LConditionFilter,tp,LOCATION_MZONE,0,nil,f,lc,e)
local mg2=Duel.GetMatchingGroup(Auxiliary.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp) local mg2=Duel.GetMatchingGroup(Auxiliary.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp)
local mg3=Duel.GetMatchingGroup(cm.extracheck,tp,LOCATION_SZONE,0,nil) local mg3=Duel.GetMatchingGroup(cm.extracheck,tp,LOCATION_SZONE,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end if mg2:GetCount()>0 then mg:Merge(mg2) end
if mg3:GetCount()>0 then mg:Merge(mg3) end if mg3:GetCount()>0 then mg:Merge(mg3) end
return mg return mg
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsSetCard(0x562) and c:IsAbleToHand() return c:IsSetCard(0x562) and c:IsAbleToHand()
end end
...@@ -114,12 +115,14 @@ function cm.IsLinkZoneOver(count) ...@@ -114,12 +115,14 @@ function cm.IsLinkZoneOver(count)
for i=0,4 do for i=0,4 do
if (Duel.GetLinkedZone(0)&((2^i)<<0))~=0 then if (Duel.GetLinkedZone(0)&((2^i)<<0))~=0 then
flag=flag+1 flag=flag+1
elseif (Duel.GetLinkedZone(1)&((2^i)<<0))~=0 then end
if (Duel.GetLinkedZone(1)&((2^i)<<0))~=0 then
flag=flag+1 flag=flag+1
end end
end end
return flag>=count return flag>=count
end end
function cm.tgcheck(c) function cm.tgcheck(c)
return c:IsLocation(LOCATION_SZONE) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()) return c:IsLocation(LOCATION_SZONE) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup())
end end
...@@ -142,6 +145,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -142,6 +145,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
......
...@@ -58,7 +58,7 @@ function cm.LinkOperation(f,minc,maxc,gf) ...@@ -58,7 +58,7 @@ function cm.LinkOperation(f,minc,maxc,gf)
end end
end end
function cm.lcheck(c) function cm.lcheck(c)
return c:IsSetCard(0x562) or c:GetOriginalCode()==33300308 return c:IsLinkSetCard(0x562) or (c:GetOriginalCode()==33300308 and not c:IsDisabled())
end end
function cm.extracheck(c) function cm.extracheck(c)
return c:IsFaceup() and c:GetOriginalCode()==33300308 return c:IsFaceup() and c:GetOriginalCode()==33300308
...@@ -83,14 +83,15 @@ function cm.ltg(...) ...@@ -83,14 +83,15 @@ function cm.ltg(...)
aux.GetLinkMaterials=f aux.GetLinkMaterials=f
return res return res
end end
function cm.GetLinkMaterials(tp,f,lc) function cm.GetLinkMaterials(tp,f,lc,e)
local mg=Duel.GetMatchingGroup(Auxiliary.LConditionFilter,tp,LOCATION_MZONE,0,nil,f,lc) local mg=Duel.GetMatchingGroup(Auxiliary.LConditionFilter,tp,LOCATION_MZONE,0,nil,f,lc,e)
local mg2=Duel.GetMatchingGroup(Auxiliary.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp) local mg2=Duel.GetMatchingGroup(Auxiliary.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp)
local mg3=Duel.GetMatchingGroup(cm.extracheck,tp,LOCATION_SZONE,0,nil) local mg3=Duel.GetMatchingGroup(cm.extracheck,tp,LOCATION_SZONE,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end if mg2:GetCount()>0 then mg:Merge(mg2) end
if mg3:GetCount()>0 then mg:Merge(mg3) end if mg3:GetCount()>0 then mg:Merge(mg3) end
return mg return mg
end end
function cm.ctcheck(c,tp) function cm.ctcheck(c,tp)
return c:IsControler(1-tp) return c:IsControler(1-tp)
end end
...@@ -125,12 +126,14 @@ function cm.IsLinkZoneOver(count) ...@@ -125,12 +126,14 @@ function cm.IsLinkZoneOver(count)
for i=0,4 do for i=0,4 do
if (Duel.GetLinkedZone(0)&((2^i)<<0))~=0 then if (Duel.GetLinkedZone(0)&((2^i)<<0))~=0 then
flag=flag+1 flag=flag+1
elseif (Duel.GetLinkedZone(1)&((2^i)<<0))~=0 then end
if (Duel.GetLinkedZone(1)&((2^i)<<0))~=0 then
flag=flag+1 flag=flag+1
end end
end end
return flag>=count return flag>=count
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsSetCard(0x562) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x562) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
...@@ -143,6 +146,7 @@ function cm.filter(c) ...@@ -143,6 +146,7 @@ function cm.filter(c)
return c:IsFaceup() and (c:GetAttack()>0 or aux.NegateMonsterFilter(c)) return c:IsFaceup() and (c:GetAttack()>0 or aux.NegateMonsterFilter(c))
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
...@@ -153,34 +157,35 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -153,34 +157,35 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
if cm.IsLinkZoneOver(3)and Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then if cm.IsLinkZoneOver(3)and Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local sg=Duel.SelectMatchingCard(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil) local sg=Duel.SelectMatchingCard(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=sg:GetFirst() local tc1=sg:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc1,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc1:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2) tc1:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL) e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetValue(0) e3:SetValue(0)
tc:RegisterEffect(e3) tc1:RegisterEffect(e3)
end end
end end
end end
......
...@@ -32,8 +32,8 @@ end ...@@ -32,8 +32,8 @@ end
function cm.tg(e,c) function cm.tg(e,c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x562) return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x562)
end end
function cm.spcheck(e,tp,c) function cm.spcheck(c,e,tp)
return c:IsSetCard(0x562) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x562) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spcheck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spcheck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
......
...@@ -31,6 +31,39 @@ function cm.AllGlobalCheck(c) ...@@ -31,6 +31,39 @@ function cm.AllGlobalCheck(c)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,reason) Duel.SendtoGrave(g,reason)
end end
cm[2]=Card.RemoveOverlayCard
Card.RemoveOverlayCard=function(card,player,min,max,reason)
local g=card:GetOverlayGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
g=g:Select(player,min,max,reason)
Duel.SendtoGrave(g,reason)
local ct=Duel.GetOperatedGroup():GetCount()
if ct>0 then return 1 else return 0 end
end
cm[3]=Duel.RemoveOverlayCard
Duel.RemoveOverlayCard=function(player,ints,into,min,max,reason)
if ints==1 then ints=LOCATION_ONFIELD end
if into==1 then into=LOCATION_ONFIELD end
local g=Duel.GetMatchingGroup(function(c)return c:CheckRemoveOverlayCard(player,min,reason)end,player,ints,into,nil)
local sg=Group.CreateGroup()
for tc in aux.Next(g) do sg:Merge(tc:GetOverlayGroup()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
sg=sg:Select(player,min,max,reason)
Duel.SendtoGrave(sg,reason)
local ct=Duel.GetOperatedGroup():GetCount()
if ct>0 then return 1 else return 0 end
end
cm[4]=Duel.SendtoGrave
Duel.SendtoGrave=function(target,reason)
local tg=Group.__add(target,target)
local g=tg:Filter(function(c)return c:IsLocation(LOCATION_OVERLAY) and c:IsOriginalSetCard(0x3537) and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:GetOriginalType()&TYPE_PENDULUM+TYPE_LINK==0 and c:IsAbleToDeck()end,nil)
for tc in aux.Next(g) do
Duel.Hint(HINT_CARD,0,tc:GetOriginalCodeRule())
Duel.SendtoDeck(tc,nil,1,reason)
tc:ReverseInDeck()
end
cm[4](Group.__sub(tg,g),reason)
end
--cm[2]=Card.ReverseInDeck --cm[2]=Card.ReverseInDeck
--Card.ReverseInDeck=function(card) --Card.ReverseInDeck=function(card)
--card:RegisterFlagEffect(53707050,RESET_EVENT+0x53c0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(53702500,2)) --card:RegisterFlagEffect(53707050,RESET_EVENT+0x53c0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(53702500,2))
...@@ -113,7 +146,7 @@ function cm.Peacecho(c) ...@@ -113,7 +146,7 @@ function cm.Peacecho(c)
c:RegisterEffect(e9) c:RegisterEffect(e9)
end end
function cm.PeacechoRepFilter(c) function cm.PeacechoRepFilter(c)
return c:GetDestination()==LOCATION_GRAVE and c:IsOriginalSetCard(0x3537) and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:GetOriginalType()&TYPE_PENDULUM==0 return c:GetDestination()==LOCATION_GRAVE and c:IsOriginalSetCard(0x3537) and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:GetOriginalType()&TYPE_PENDULUM+TYPE_LINK==0 and c:IsAbleToDeck()
end end
function cm.PeacechoToDeckTarget1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.PeacechoToDeckTarget1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -1754,8 +1787,21 @@ function cm.Hartrazlkop(marker) ...@@ -1754,8 +1787,21 @@ function cm.Hartrazlkop(marker)
if g:GetCount()==0 then break end if g:GetCount()==0 then break end
sg2:Merge(g) sg2:Merge(g)
end end
c:SetMaterial(sg2)
Duel.SendtoGrave(sg2,REASON_MATERIAL+REASON_LINK) Duel.SendtoGrave(sg2,REASON_MATERIAL+REASON_LINK)
sg2:KeepAlive()
local self=Group.FromCards(c)
self:KeepAlive()
cm[100]=sg2
cm[101]=e
cm[102]=self
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_MOVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(cm.adjustcon2)
e3:SetOperation(cm.adjustop2)
Duel.RegisterEffect(e3,tp)
c:SetMaterial(sg2)
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -1773,6 +1819,20 @@ function cm.Hartrazlkop(marker) ...@@ -1773,6 +1819,20 @@ function cm.Hartrazlkop(marker)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
c:RegisterEffect(e2) c:RegisterEffect(e2)
c:CompleteProcedure() c:CompleteProcedure()
Debug.Message(c:GetLinkMarker()) c:RegisterFlagEffect(53729000,0,0,0)
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
function cm.adjustcon2(e,tp,eg,ep,ev,re,r,rp)
return cm[102]:GetFirst():GetFlagEffect(53729000)>0
end
function cm.adjustop2(e,tp,eg,ep,ev,re,r,rp)
Debug.Message(#cm[100])
local sc=cm[102]:GetFirst()
Debug.Message(sc:GetCode())
if sc:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
Duel.RaiseEvent(cm[100],EVENT_BE_MATERIAL,cm[101],REASON_SYNCHRO,tp,tp,0)
for tc in aux.Next(cm[100]) do
Duel.RaiseSingleEvent(tc,EVENT_BE_MATERIAL,cm[101],REASON_SYNCHRO,tp,tp,0)
end end
end end
...@@ -3,7 +3,7 @@ function c72404125.initial_effect(c) ...@@ -3,7 +3,7 @@ function c72404125.initial_effect(c)
--spsummon itself --spsummon itself
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(72404125,0)) e1:SetDescription(aux.Stringid(72404125,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,72404125) e1:SetCountLimit(1,72404125)
......
...@@ -48,7 +48,7 @@ function c9910862.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,7 @@ function c9910862.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1500) e1:SetValue(1500)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local ct=1 local ct=1
......
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