Commit 1a4416a4 authored by Tachibana's avatar Tachibana

nmbd

parent 7ce26256
......@@ -80,7 +80,7 @@ function rk.indes(c,code)
tc:RegisterEffect(e5)
return e3,e4,e5
end
function rk.indes(c,code,att)
function rk.indes1(c,code,att)
local tc=c
--disable spsummon
local e1=Effect.CreateEffect(c)
......
......@@ -31,24 +31,37 @@ end
function cm.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==0
end
function cm.cfilter(c)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToGraveAsCost()
function cm.costfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
e:SetLabel(100)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.filter(c,check)
return c:IsControlerCanBeChanged(check) and c:IsFaceup()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then
local check=e:GetLabel()==100
e:SetLabel(0)
return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil,check)
end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function cm.filter2(c)
return c:IsControlerCanBeChanged() and c:IsFaceup()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
while tc do
if tc then
Duel.GetControl(tc,tp,PHASE_END,2)
tc=g:GetNext()
end
local effp=e:GetHandler():GetControler()
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -63,7 +63,7 @@ end
function cm.splimit(e,c)
return not (c:IsSetCard(0xce0))
end
function cm.thfilter(c)
function cm.thfilter(c,e,tp)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
......
......@@ -27,7 +27,7 @@ function cm.initial_effect(c)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
......@@ -72,6 +72,7 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if re:GetHandler():IsRelateToEffect(re) then
local tc=re:GetHandler()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......
......@@ -20,7 +20,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.GetAttackTarget()==nil
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and c:GetBaseAttack()==0
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end
......
......@@ -40,7 +40,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.cfilter(c)
return c:GetBaseAttack()==0 and c:IsDiscardable()
return c:GetBaseAttack()==0 and c:IsDiscardable() and c:IsType(TYPE_MONSTER)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
......
......@@ -30,7 +30,7 @@ function cm.initial_effect(c)
end
cm.toss_dice=true
function cm.atkfilter(c)
return c:IsFaceup() and c:GetBaseAttack()==0 and not c:IsHasEffect(EFFECT_EXTRA_ATTACK)
return c:IsFaceup() and c:GetBaseAttack()==0 and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) and c:IsType(TYPE_MONSTER)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.atkfilter(chkc) end
......
......@@ -31,7 +31,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.tfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:GetBaseAttack()==0 and c:IsControler(tp)
return c:IsLocation(LOCATION_MZONE) and c:GetBaseAttack()==0 and c:IsControler(tp) and c:IsType(TYPE_MONSTER)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
......
......@@ -37,7 +37,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.spfilter(c,e,tp)
return c:GetBaseAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
return c:GetBaseAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and c:IsType(TYPE_MONSTER)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -63,7 +63,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetBaseAttack()~=0
return c:GetBaseAttack()~=0 and c:IsType(TYPE_MONSTER)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
......
......@@ -53,7 +53,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.atktg(e,c)
return c:GetBaseAttack()==0
return c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
......
......@@ -31,10 +31,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function cm.atlimit(e,c)
return c:GetBaseAttack()==0
return c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
function cm.repfilter(c,tp)
return c:IsFaceup() and c:GetBaseAttack()==0 and c:IsLocation(LOCATION_MZONE)
return c:IsFaceup() and c:GetBaseAttack()==0 and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_MONSTER)
and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -36,7 +36,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsChainNegatable(ev)
end
function cm.spfilter(c,e,tp)
return c:GetBaseAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:GetBaseAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -62,7 +62,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.tgfilter(c)
return c:GetBaseAttack()~=0
return c:GetBaseAttack()~=0 and c:IsType(TYPE_MONSTER)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.tgfilter,1,nil)
......@@ -96,7 +96,7 @@ function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m+900,RESET_EVENT+RESETS_STANDARD,0,1,e:GetLabel())
end
function cm.valfilter(c)
return c:GetBaseAttack()==0
return c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
......
......@@ -27,7 +27,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.costfilter(c)
return c:GetBaseAttack()==0 and c:IsDiscardable()
return c:GetBaseAttack()==0 and c:IsDiscardable() and c:IsType(TYPE_MONSTER)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
......@@ -49,7 +49,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.atkfilter(c)
return c:IsFaceup() and c:GetBaseAttack()==0
return c:IsFaceup() and c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.atkfilter(chkc) end
......
......@@ -29,10 +29,10 @@ function cm.initial_effect(c)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.synfilter(c)
return c:GetBaseAttack()==0
return c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
function cm.counterfilter(c)
return c:GetBaseAttack()==0
return c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
......@@ -49,10 +49,10 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetBaseAttack()~=0
return c:GetBaseAttack()~=0 and c:IsType(TYPE_MONSTER)
end
function cm.spfilter(c,e,tp)
return c:GetBaseAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:GetBaseAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -72,7 +72,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.assfilter(c)
return c:GetBaseAttack()~=0
return c:GetBaseAttack()~=0 and c:IsType(TYPE_MONSTER)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.assfilter,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -54,8 +54,8 @@ function cm.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER) and te:GetOwner():GetBaseAttack()~=0
end
function cm.indval(e,c)
return c:GetBaseAttack()~=0
return c:GetBaseAttack()~=0 and c:IsType(TYPE_MONSTER)
end
function cm.atktg(e,c)
return c:GetBaseAttack()==0
return c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
......@@ -15,7 +15,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
end
function cm.cfilter(c)
return c:GetBaseAttack()~=0 and c:IsFaceup()
return c:GetBaseAttack()~=0 and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.cfilter(chkc) end
......@@ -52,5 +52,5 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return c:GetBaseAttack()~=0
return c:GetBaseAttack()~=0 and c:IsType(TYPE_MONSTER)
end
......@@ -16,7 +16,7 @@ function c81044007.initial_effect(c)
Duel.AddCustomActivityCounter(81044007,ACTIVITY_ATTACK,c81044007.counterfilter)
end
function c81044007.counterfilter(c)
return c:GetBaseAttack()==0
return c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
function c81044007.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
......@@ -36,7 +36,7 @@ function c81044007.atktg(e,c)
return c:GetBaseAttack()~=0
end
function c81044007.filter(c)
return c:IsFaceup() and c:GetBaseAttack()==0
return c:IsFaceup() and c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
function c81044007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c81044007.filter(chkc) end
......
......@@ -12,7 +12,7 @@ function c81044008.initial_effect(c)
c:RegisterEffect(e1)
end
function c81044008.cfilter(c)
return c:IsFaceup() and c:GetBaseAttack()==0
return c:IsFaceup() and c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
function c81044008.condition(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or not Duel.IsExistingMatchingCard(c81044008.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
......
......@@ -29,10 +29,10 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.mfilter(c)
return c:GetBaseAttack()==0
return c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
function cm.filter(c,e,tp,zone)
return (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:GetBaseAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp,zone)
return (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:GetBaseAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp,zone) and c:IsType(TYPE_MONSTER)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
......@@ -71,5 +71,5 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e4,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetBaseAttack()~=0
return c:GetBaseAttack()~=0 and c:IsType(TYPE_MONSTER)
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