Commit 88364768 authored by TanakaKotoha's avatar TanakaKotoha

tnndx

parent 72daa42a
......@@ -49,7 +49,7 @@ function cm.act(e,tp)
Duel.RegisterEffect(e1,tp)
local e2=rsef.RegisterClone({c,tp},e1,"code",EFFECT_CANNOT_INACTIVATE)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
if c:IsRelateToEffect(e) and c:IsCanTurnSet() and rscon.excard2(rsva.filter_ar,LOCATION_MZONE,0,1)(e,tp) then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
......
......@@ -29,11 +29,11 @@ function cm.act(e,tp)
local op=e:GetLabel()
if op==1 then
if rsop.SelectRemove(tp,aux.NecroValleyFilter(cm.rmfilter1),tp,0,rsloc.og,1,1,nil,{})>0 and Duel.GetOperatedGroup():GetFirst():IsLocation(LOCATION_REMOVED) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then
local e1=rsef.FV_LIMIT({c,tp},"dis",nil,aux.FilterBoolFunction(Card.IsType,TYPE_SPELL),{ 0,LOCATION_ONFIELD },nil,rsreset.pend)
local e1=rsef.FV_LIMIT({c,tp},"dis",nil,aux.TargetBoolFunction(Card.IsType,TYPE_SPELL),{ 0,LOCATION_ONFIELD },nil,rsreset.pend)
end
elseif op==2 then
if rsop.SelectRemove(tp,aux.NecroValleyFilter(cm.rmfilter2),tp,0,rsloc.og,1,1,nil,{})>0 and Duel.GetOperatedGroup():GetFirst():IsLocation(LOCATION_REMOVED) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then
local e1=rsef.FV_LIMIT({c,tp},"dis",nil,aux.FilterBoolFunction(Card.IsType,TYPE_SPELL),{ 0,LOCATION_ONFIELD },nil,rsreset.pend)
local e1=rsef.FV_LIMIT({c,tp},"dis",nil,aux.TargetBoolFunction(Card.IsType,TYPE_TRAP),{ 0,LOCATION_ONFIELD },nil,rsreset.pend)
end
else
local ct,og,tc=rsop.SelectRemove(tp,aux.NecroValleyFilter(cm.rmfilter3),tp,0,rsloc.og,1,1,nil,{})
......
......@@ -6,18 +6,7 @@ function cm.initial_effect(c)
local e2=rsef.FTO(c,EVENT_SUMMON_SUCCESS,{m,0},{1,m},"sp,atk,def","de",LOCATION_HAND,cm.spcon,nil,rsop.target2(cm.fun,rscf.spfilter2(),"sp"),cm.spop)
local e5=rsef.RegisterClone(c,e2,"code",EVENT_SPSUMMON_SUCCESS)
local e3=rsef.SV_INDESTRUCTABLE(c,"battle")
--negate
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_CHAINING)
e7:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1,m+100)
e7:SetCondition(cm.diacon)
e7:SetTarget(cm.diatg)
e7:SetOperation(cm.diaop)
c:RegisterEffect(e7)
local e4=rsef.QO_NEGATE(c,"neg",nil,"des",LOCATION_MZONE,rscon.negcon(cm.filter))
end
function cm.spcon(e,tp,eg)
local tc=eg:GetFirst()
......@@ -58,24 +47,6 @@ function cm.spop(e,tp,eg)
local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1)
end
end
function cm.diacon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
local atk=c:GetAttack()
local btk=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_ATTACK)
return re:IsActiveType(TYPE_MONSTER) and rc:GetOriginalCode()~=65010561 and atk==btk
and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function cm.diatg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.diaop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function cm.filter(e,tp,re,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttack(e:GetHandler():GetAttack()) and not re:GetHandler():IsOriginalCodeRule(m)
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