Commit 8321fa34 authored by wind2009's avatar wind2009

Fix 時の沈黙-ターン・サイレンス

修复以下bug:
不应可以取超量/连接怪兽为对象发动①效果
没能让等级上升也应无效效果
应需要黄金柜和对应怪兽均表侧表示才能无效
parent d14d371f
...@@ -65,6 +65,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,6 +65,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
end end
if #g>0 then if #g>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
...@@ -83,6 +84,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,6 +84,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):Select(tp,1,1,nil) local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):Select(tp,1,1,nil)
if #g>0 then if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
......
--時の沈黙-ターン・サイレンス --時の沈黙-ターン・サイレンス
--Coded by Lee
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101204051) aux.AddCodeList(c,101204051)
...@@ -23,11 +22,20 @@ function s.initial_effect(c) ...@@ -23,11 +22,20 @@ function s.initial_effect(c)
e2:SetOperation(s.baop) e2:SetOperation(s.baop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.lvfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1)
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) and c:IsControler(tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and s.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.nfilter1(c)
return c:IsFaceup() and c:IsCode(101204051)
end
function s.nfilter2(c)
return c:IsFaceup() and aux.IsCodeListed(c,101204051)
end end
function s.lvop(e,tp,eg,ep,ev,re,r,rp) function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
...@@ -39,12 +47,12 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,12 +47,12 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(3) e1:SetValue(3)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local ct=Duel.GetCurrentChain() end
if ct<2 then return end local ct=Duel.GetCurrentChain()
local te,tep=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) if ct<2 then return end
if tep==1-tp and te:IsActiveType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,nil,101204051) and Duel.IsExistingMatchingCard(aux.IsCodeListed,tp,LOCATION_MZONE,0,1,nil,101204051) then local te,tep=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
Duel.NegateEffect(ct-1) if tep==1-tp and te:IsActiveType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(s.nfilter1,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(s.nfilter2,tp,LOCATION_MZONE,0,1,nil) then
end Duel.NegateEffect(ct-1)
end end
end end
function s.bacon(e,tp,eg,ep,ev,re,r,rp) function s.bacon(e,tp,eg,ep,ev,re,r,rp)
...@@ -52,7 +60,7 @@ function s.bacon(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +60,7 @@ function s.bacon(e,tp,eg,ep,ev,re,r,rp)
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
if not tc then return false end if not tc then return false end
e:SetLabelObject(tc) e:SetLabelObject(tc)
return aux.IsCodeListed(tc,101204051) return tc:IsFaceup() and aux.IsCodeListed(tc,101204051)
end end
function s.baop(e,tp,eg,ep,ev,re,r,rp) function s.baop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
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