Commit 3724be5c authored by Tachibana's avatar Tachibana

1145141919810

parent 58f98679
...@@ -46,12 +46,15 @@ function cm.initial_effect(c) ...@@ -46,12 +46,15 @@ function cm.initial_effect(c)
e4:SetOperation(cm.operation) e4:SetOperation(cm.operation)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function cm.cknfilter(c)
return c:GetOriginalCode()==77765004 and not c:IsDisabled()
end
function cm.lkfilter(c,lc,tp) function cm.lkfilter(c,lc,tp)
local flag=c:IsFaceup() and c:IsCanBeLinkMaterial(lc) local flag=c:IsFaceup() and c:IsCanBeLinkMaterial(lc)
if c:IsType(TYPE_MONSTER) then if c:IsType(TYPE_MONSTER) then
return flag and c:IsSetCard(0xfa4) return flag and c:IsSetCard(0xfa4)
else else
return c:IsFaceup() and c:IsType(TYPE_SPELL) return c:IsFaceup() and c:IsType(TYPE_SPELL) and not Duel.IsExistingMatchingCard(cm.cknfilter,tp,0,LOCATION_SZONE,1,nil)
end end
end end
function cm.lvfilter(c) function cm.lvfilter(c)
...@@ -133,22 +136,20 @@ function cm.tnop(e,tp,eg,ep,ev,re,r,rp) ...@@ -133,22 +136,20 @@ function cm.tnop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,1))
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2)) e3:SetDescription(aux.Stringid(m,2))
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.condition) e3:SetCondition(cm.condition)
e3:SetValue(cm.efilter) e3:SetValue(cm.efilter)
...@@ -159,25 +160,25 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -159,25 +160,25 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not ct or ct<2 return not ct or ct<2
end end
function cm.efilter(e,te) function cm.efilter(e,te)
return re and e:GetOwnerPlayer()~=re:GetOwnerPlayer() return e:GetOwnerPlayer()~=te:GetOwnerPlayer()
end end
function cm.costfilter(c,tp) function cm.costfilter(c,tp)
return c:IsSetCard(0xfa4) and c:IsPosition(POS_FACEUP) and c:IsReleasable() return c:IsSetCard(0xfa4) and c:IsPosition(POS_FACEUP) and c:IsReleasable()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if Duel.GetCurrentChain()>1 and Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_SZONE,0,3,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if Duel.GetCurrentChain()>1 and Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_SZONE,0,3,3,nil) local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.Release(g,REASON_EFFECT) Duel.Release(g,REASON_EFFECT)
e:SetLabel(1) e:SetLabel(1)
end end
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...@@ -209,7 +210,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -209,7 +210,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
if e:GetLabel()==1 then if e:GetLabel()==1 then
local check=false local check=false
for i=1,ev do local chainc=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT)
for i=1,chainc do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT) local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
if te:GetOwnerPlayer()==1-tp then if te:GetOwnerPlayer()==1-tp then
check=Duel.NegateActivation(i) or check check=Duel.NegateActivation(i) or check
......
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