Commit 465b3a3b authored by Tachibana's avatar Tachibana

nmbd

parent 87c1e9e0
......@@ -41,7 +41,7 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
if not (re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRace(RACE_ZOMBIE)) then return end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
end
function cm.filter(c)
function cm.filter(c,tp)
local code1,code2=c:GetCode()
if code2~=0 and code2~=nil then return Duel.GetFlagEffect(tp,code1*10)==0 and Duel.GetFlagEffect(tp,code2*10)==0 and c:IsType(TYPE_MONSTER) end
......@@ -49,20 +49,20 @@ function cm.filter(c)
end
function cm.crcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(m)~=0 and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRace(RACE_ZOMBIE) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil)
return c:GetFlagEffect(m)~=0 and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRace(RACE_ZOMBIE) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil,tp)
end
function cm.filter1(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE)
end
function cm.crcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil) and eg:IsExists(cm.filter1,1,nil)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil,tp) and eg:IsExists(cm.filter1,1,nil)
end
function cm.crop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local c=e:GetHandler()
local og=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,1,nil)
local og=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,1,nil,tp)
if og:GetCount()>0 then
local tc=og:GetFirst()
local code1,code2=tc:GetCode()
......
......@@ -61,7 +61,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ConfirmCards(1-tp,g)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
......@@ -105,7 +105,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode())
local tc2=g:GetFirst()
tc2:SetMaterial(nil)
if Duel.SpecialSummon(tc2,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then
local ss=Duel.SpecialSummon(tc2,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
tc2:CompleteProcedure()
if ss~=0 then
Duel.Destroy(tc,REASON_EFFECT)
end
end
......
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