Commit a9368196 authored by Tachibana's avatar Tachibana

tnndx

parent d57679e6
......@@ -1162,17 +1162,14 @@ function C9.KomachiMonster(c,num)
if c:GetOriginalCode()==20100512 then --傻逼写法,懒得写循环了
local he1=he:Clone()
he1:SetCode(EFFECT_UNRELEASABLE_NONSUM)
local he2=Effect.CreateEffect(c)
he2:SetType(EFFECT_TYPE_SINGLE)
he2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
local he2=he:Clone()
he2:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
he2:SetValue(function (e,c,sumtype) return sumtype==SUMMON_TYPE_FUSION end)
local he3=he2:Clone()
local he3=he:Clone()
he3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
he3:SetValue(1)
local he4=he3:Clone()
local he4=he:Clone()
he4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
local he5=he4:Clone()
local he5=he:Clone()
he5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
local ge1=e2:Clone()
ge1:SetLabelObject(he1)
......@@ -1184,7 +1181,7 @@ function C9.KomachiMonster(c,num)
ge4:SetLabelObject(he4)
local ge5=e2:Clone()
ge5:SetLabelObject(he5)
C9.RegisterEffect_Batch(c,he1,he2,he3,he4,he5)
C9.RegisterEffect_Batch(c,ge1,ge2,ge3,ge4,ge5)
end
--splimit
local e5=Effect.CreateEffect(c)
......
......@@ -40,14 +40,15 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST)
g:KeepAlive()
e:SetLabelObject(g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,Card.IsCode,tp,0,LOCATION_MZONE,1,1,nil,20100500)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local sg0=Duel.SelectMatchingCard(tp,Card.IsCode,tp,0,LOCATION_MZONE,1,1,nil,20100500)
if #sg0==0 then return end
local tc=sg0:GetFirst()
if not tc:IsImmuneToEffect(e) then
local gc=e:GetLabelObject():GetFirst()
local m=_G["c"..gc:GetCode()]
local e3=Effect.CreateEffect(c)
......
......@@ -6,10 +6,11 @@ function cm.initial_effect(c)
aux.AddCodeList(c,20100500)
--huyuurei_effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetTarget(cm.htg)
e1:SetValue(1)
cm.huyuurei_effect=e1
C9.KomachiMonster(c,m)
......@@ -24,10 +25,14 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.htg(e,c)
return math.abs(e:GetHandler():GetSequence()-c:GetSequence())==1
end
function cm.filter(c,tp,x1,y1)
if c:IsLocation(LOCATION_FZONE) then return false end
local x,y=C9.GetCoordinate(c,tp)
return math.abs((x+y)-(x1+y1))==1
return (math.abs(x-x1)+math.abs(y-y1))==1
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -33,8 +33,8 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function cm.dfilter(c,seq1,seq2)
if c:IsDisabled() or c:IsType(TYPE_NORMAL) then return false end
return C9.IsBetween(c:GetSequence(),seq1,seq2)
and (not c:IsDisabled() or c:IsType(TYPE_TRAPMONSTER)) and not (c:IsType(TYPE_NORMAL) and bit.band(c:GetOriginalType(),TYPE_NORMAL))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
......@@ -52,22 +52,22 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(cm.dfilter,tp,0,LOCATION_MZONE,nil,seq1,seq2)
local nc=dg:GetFirst()
while nc do
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(C9.S_Reset)
nc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
nc:RegisterEffect(e2)
if nc:IsType(TYPE_TRAPMONSTER) then
local e3=e1:Clone()
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
nc:RegisterEffect(e3)
end
nc=ng:GetNext()
nc=dg:GetNext()
end
end
end
......@@ -19,7 +19,7 @@ end
function cm.filter2(c,tp,x1,y1,distance)
if c:IsLocation(LOCATION_FZONE) then return false end
local x,y=C9.GetCoordinate(c,tp)
return math.abs((x+y)-(x1+y1))==distance
return (math.abs(x-x1)+math.abs(y-y1))==distance
end
function cm.filter1(c,tp,distance)
......
......@@ -62,7 +62,7 @@ function cm.splimit(e,c)
return not c:IsRace(RACE_SPELLCASTER)
end
function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRace(RACE_SPELLCASTER) and re:GetHandler():IIsType(TYPE_RITUAL) and re:IsActiveType(TYPE_MONSTER) and ep==tp then
if re:GetHandler():IsRace(RACE_SPELLCASTER) and re:GetHandler():IsType(TYPE_RITUAL) and re:IsActiveType(TYPE_MONSTER) and ep==tp then
Duel.SetChainLimit(cm.chainlm)
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